<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="/rss/styles.xsl" type="text/xsl"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Brian Sunter</title><description>Software engineer and writer exploring web development, productivity systems, AI, and creative projects. Sharing insights on building better tools and workflows.</description><link>https://briansunter.com</link><language>en-us</language><lastBuildDate>Wed, 13 May 2026 00:00:00 GMT</lastBuildDate><atom:link href="https://briansunter.com/index.xml" rel="self" type="application/rss+xml"/><copyright>© 2026 Brian Sunter</copyright><managingEditor>noreply@briansunter.com (Brian Sunter)</managingEditor><webMaster>noreply@briansunter.com (Brian Sunter)</webMaster><item><title>Bevy Agent</title><link>https://briansunter.com/projects/bevy-agent</link><guid isPermaLink="true">https://briansunter.com/projects/bevy-agent</guid><description>A Bevy plugin for driving a game as a deterministic simulation that an AI agent can step, inspect, snapshot, restore, replay, and branch.</description><pubDate>Wed, 13 May 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/bevy-agent-hero.D3V6tuFO_Z1aM6GQ.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;Bevy Agent is a Bevy plugin that turns a game into a deterministic simulation an external agent can drive tick-by-tick. Drop it into your &lt;code&gt;App&lt;/code&gt;, register your gameplay state, and the plugin exposes &lt;code&gt;reset&lt;/code&gt;, &lt;code&gt;step&lt;/code&gt;, &lt;code&gt;snapshot&lt;/code&gt;, &lt;code&gt;restore&lt;/code&gt;, and &lt;code&gt;branch&lt;/code&gt; over an in-process API, stdio JSON-RPC, HTTP, or WebSocket.&lt;/p&gt;
&lt;p&gt;I built it to make Bevy games usable as RL environments and as reproducible test harnesses, without leaving the regular Bevy plugin and ECS model.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Bevy Agent architecture diagram&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1536px) 1536px, 100vw&quot; width=&quot;1536&quot; height=&quot;1024&quot; src=&quot;https://briansunter.com/_astro/bevy-agent-diagram.C3X7PS77_Z1cQF54.webp&quot; srcset=&quot;https://briansunter.com/_astro/bevy-agent-diagram.C3X7PS77_Z1jbaT2.webp 640w, https://briansunter.com/_astro/bevy-agent-diagram.C3X7PS77_1dt29I.webp 750w, https://briansunter.com/_astro/bevy-agent-diagram.C3X7PS77_Z2v1tjv.webp 828w, https://briansunter.com/_astro/bevy-agent-diagram.C3X7PS77_Z2h1Y9S.webp 1080w, https://briansunter.com/_astro/bevy-agent-diagram.C3X7PS77_JII05.webp 1280w, https://briansunter.com/_astro/bevy-agent-diagram.C3X7PS77_Z1cQF54.webp 1536w&quot; /&gt;&lt;figcaption&gt;Bevy Agent architecture diagram&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2&gt;Features&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Deterministic stepping via &lt;code&gt;SimClock&lt;/code&gt; + a dedicated &lt;code&gt;AgentTick&lt;/code&gt; schedule&lt;/li&gt;
&lt;li&gt;Tier-1 snapshots of every registered resource and component, keyed by &lt;code&gt;StableEntityId&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Action logs, checkpoint indexes, and timeline branches for replay and what-if exploration&lt;/li&gt;
&lt;li&gt;Optional headless PNG capture with tick/frame/size metadata&lt;/li&gt;
&lt;li&gt;JSON-RPC over in-process, stdio, HTTP &lt;code&gt;POST /rpc&lt;/code&gt;, or WebSocket&lt;/li&gt;
&lt;li&gt;Rust API, an &lt;code&gt;agentctl&lt;/code&gt; HTTP CLI, and a stdlib-only Python client&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Crates&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;bevy_agent_core&lt;/code&gt;: schedules, &lt;code&gt;SimClock&lt;/code&gt;, domain actions, input frames, observations, rewards, terminal state, checksums&lt;/li&gt;
&lt;li&gt;&lt;code&gt;bevy_agent_runner&lt;/code&gt;: owns the &lt;code&gt;App&lt;/code&gt;, exposes the control API and visual capture hooks&lt;/li&gt;
&lt;li&gt;&lt;code&gt;bevy_agent_snapshot&lt;/code&gt;: snapshots of registered resources and components with stable entity IDs&lt;/li&gt;
&lt;li&gt;&lt;code&gt;bevy_agent_replay&lt;/code&gt;: action logs, checkpoint indexes, timeline branches&lt;/li&gt;
&lt;li&gt;&lt;code&gt;bevy_agent_remote&lt;/code&gt;: JSON-RPC bridge with capability and session-token checks&lt;/li&gt;
&lt;li&gt;&lt;code&gt;sample_platformer&lt;/code&gt;: a headless reference game wired end-to-end into &lt;code&gt;AgentTick&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Quick Start&lt;/h2&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;rust&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;use&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; bevy_agent_core&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;::&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;AgentAction&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;use&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; bevy_agent_runner&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;::&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;AgentApp&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;ResetOptions&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;};&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;let&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; mut&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; env &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; AgentApp&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;::&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;sample_platformer&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;::&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;build_headless_app);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;let&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; obs0 &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; env&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;reset&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;ResetOptions&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;::&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;default&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;())&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;?&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;let&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; step1 &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; env&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;step&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;AgentAction&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;::&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;Move&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; { x&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 1.0&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, y&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 0.0&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; })&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;?&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;let&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; snapshot &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; env&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;snapshot&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;()&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;?&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;env&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;step&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;AgentAction&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;::&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;Jump&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;?&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;env&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;restore&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(snapshot&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;snapshot_id)&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;?&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;let&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; alternate &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; env&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;step&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;AgentAction&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;::&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;Noop&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;?&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Drive it from Python over HTTP:&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;python&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; bevy_agent_client &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; AgentClient&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;env &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; AgentClient(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;http://127.0.0.1:4000/rpc&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;obs &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; env.reset(&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;seed&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;42&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;step &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; env.step({&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;type&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;Move&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;x&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;1.0&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;y&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;0.0&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;})&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;snapshot &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; env.snapshot()&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;env.restore(snapshot[&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;snapshot_id&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;])&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h2&gt;Determinism Contract&lt;/h2&gt;
&lt;p&gt;Gameplay systems that want replayable behavior should:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;run in &lt;code&gt;AgentTick&lt;/code&gt;, not the ordinary frame &lt;code&gt;Update&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;read &lt;code&gt;SimClock&lt;/code&gt;, not wall-clock &lt;code&gt;Time&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;consume &lt;code&gt;CurrentInputFrame&amp;lt;AgentAction&amp;gt;&lt;/code&gt;, not keyboard or mouse state directly&lt;/li&gt;
&lt;li&gt;use &lt;code&gt;StableEntityId&lt;/code&gt; for semantic entity identity&lt;/li&gt;
&lt;li&gt;register all gameplay state with &lt;code&gt;SnapshotAppExt&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;keep rendering and UI systems read-only with respect to authoritative state&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Technology Stack&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Rust 2024 edition, Bevy 0.18&lt;/li&gt;
&lt;li&gt;Custom &lt;code&gt;AgentTick&lt;/code&gt; schedule for deterministic stepping&lt;/li&gt;
&lt;li&gt;JSON-RPC transports: in-process, stdio, HTTP, WebSocket&lt;/li&gt;
&lt;li&gt;&lt;code&gt;image&lt;/code&gt; crate for PNG capture&lt;/li&gt;
&lt;li&gt;Python client built on the standard library, no extra deps&lt;/li&gt;
&lt;/ul&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Platform</title><link>https://briansunter.com/projects/platform</link><guid isPermaLink="true">https://briansunter.com/projects/platform</guid><description>A small 2D platformer rendered with isometric 3D models, written in C99 and built on Sokol and a tiny ECS. Same binary runs natively and in the browser via WebAssembly.</description><pubDate>Wed, 13 May 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/platform-hero.LKJBGtOr_1aouBH.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;Platform is a small side-scrolling platformer written in C99. The world is 2D, but everything on screen is a real 3D mesh from the Kenney Platformer Kit, lit at asset-conversion time so the renderer does no lighting math at runtime.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Platform gameplay screenshot&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1600px) 1600px, 100vw&quot; width=&quot;1600&quot; height=&quot;1159&quot; src=&quot;https://briansunter.com/_astro/platform-hero.LKJBGtOr_17LKvC.webp&quot; srcset=&quot;https://briansunter.com/_astro/platform-hero.LKJBGtOr_ZixUC2.webp 640w, https://briansunter.com/_astro/platform-hero.LKJBGtOr_1yjn4e.webp 750w, https://briansunter.com/_astro/platform-hero.LKJBGtOr_3e1nc.webp 828w, https://briansunter.com/_astro/platform-hero.LKJBGtOr_1TJpi5.webp 1080w, https://briansunter.com/_astro/platform-hero.LKJBGtOr_2jOCdK.webp 1280w, https://briansunter.com/_astro/platform-hero.LKJBGtOr_17LKvC.webp 1600w&quot; /&gt;&lt;figcaption&gt;Platform gameplay screenshot&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The same source builds to a native macOS/Linux binary and to a WebAssembly bundle for the browser, so desktop, mobile web, and a packaged native build all run the same gameplay code.&lt;/p&gt;
&lt;h2&gt;Features&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;2D platformer movement with run, jump variable-height jump-cut, and one-way platforms&lt;/li&gt;
&lt;li&gt;Coins, hearts, jewels, stars, keys, and other pickup types&lt;/li&gt;
&lt;li&gt;Touch controls for mobile web: left half for movement, right half to jump&lt;/li&gt;
&lt;li&gt;Deterministic gameplay core split into &lt;code&gt;game_core.c&lt;/code&gt; with its own unit test suite and 90%+ coverage gate&lt;/li&gt;
&lt;li&gt;Static C mesh data generated from Kenney OBJ models at build time, with no runtime model loading&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Technology Stack&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;C99 for all gameplay and rendering code&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/floooh/sokol&quot;&gt;Sokol&lt;/a&gt; for graphics, app, and input across Metal, OpenGL, and WebGL2&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/briansunter/c-ecs&quot;&gt;c-ecs&lt;/a&gt; for entities, components, and systems&lt;/li&gt;
&lt;li&gt;Emscripten for the WebAssembly build&lt;/li&gt;
&lt;li&gt;Python tool that bakes Kenney OBJ meshes into static C arrays&lt;/li&gt;
&lt;li&gt;Nix flake for a reproducible clang + emscripten dev shell&lt;/li&gt;
&lt;/ul&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>TRAD Strike</title><link>https://briansunter.com/projects/trad</link><guid isPermaLink="true">https://briansunter.com/projects/trad</guid><description>A small Raiden Trad-inspired vertical shooter written in C99, built on Sokol and a tiny ECS. The same binary runs natively and in the browser via WebAssembly.</description><pubDate>Wed, 13 May 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/trad-hero.DWOM3tTK_Z1WI3NT.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;TRAD Strike is a small vertical shoot-‘em-up inspired by Raiden Trad, written in C99. The view is top-down and 2D, but every ship, projectile, and prop on screen is a real 3D mesh from the Kenney Space Kit, lit at asset-conversion time so the renderer does no lighting math at runtime.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;TRAD Strike gameplay screenshot&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1600px) 1600px, 100vw&quot; width=&quot;1600&quot; height=&quot;1058&quot; src=&quot;https://briansunter.com/_astro/trad-hero.DWOM3tTK_Z2eIlWH.webp&quot; srcset=&quot;https://briansunter.com/_astro/trad-hero.DWOM3tTK_Z1st4tF.webp 640w, https://briansunter.com/_astro/trad-hero.DWOM3tTK_19SoVj.webp 750w, https://briansunter.com/_astro/trad-hero.DWOM3tTK_Zl1aw4.webp 828w, https://briansunter.com/_astro/trad-hero.DWOM3tTK_1e07rj.webp 1080w, https://briansunter.com/_astro/trad-hero.DWOM3tTK_Z1NJSVo.webp 1280w, https://briansunter.com/_astro/trad-hero.DWOM3tTK_Z2eIlWH.webp 1600w&quot; /&gt;&lt;figcaption&gt;TRAD Strike gameplay screenshot&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The same source builds to a native macOS/Linux binary and to a WebAssembly bundle, so desktop and mobile web both run the same gameplay code as the native build.&lt;/p&gt;
&lt;h2&gt;Features&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Wave-based vertical shooter with enemy waves, projectiles, particles, and pickups&lt;/li&gt;
&lt;li&gt;ECS layout with &lt;code&gt;spawn&lt;/code&gt;, &lt;code&gt;player&lt;/code&gt;, &lt;code&gt;enemy&lt;/code&gt;, &lt;code&gt;movement&lt;/code&gt;, &lt;code&gt;collision&lt;/code&gt;, &lt;code&gt;lifetime&lt;/code&gt;, and &lt;code&gt;cleanup&lt;/code&gt; systems&lt;/li&gt;
&lt;li&gt;Desktop input via WASD/arrows, Space/Z/X to fire, R to restart, mouse aim&lt;/li&gt;
&lt;li&gt;Mobile touch controls: left half is a d-pad, right half is the fire button&lt;/li&gt;
&lt;li&gt;Parallax starfield and alpha-blended glow effects rendered through Sokol GL immediate-mode&lt;/li&gt;
&lt;li&gt;Static C mesh data generated from Kenney OBJ models at build time, with no runtime model loading&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Technology Stack&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;C99 for all gameplay and rendering code&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/floooh/sokol&quot;&gt;Sokol&lt;/a&gt; for graphics, app, and input across Metal, OpenGL, and WebGL2&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/briansunter/c-ecs&quot;&gt;c-ecs&lt;/a&gt; for entities, components, and systems&lt;/li&gt;
&lt;li&gt;Emscripten for the WebAssembly build&lt;/li&gt;
&lt;li&gt;Python tool that bakes Kenney OBJ meshes into static C arrays&lt;/li&gt;
&lt;li&gt;Nix flake for a reproducible clang + emscripten dev shell&lt;/li&gt;
&lt;/ul&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Blackwater Rift</title><link>https://briansunter.com/projects/blackwater-rift</link><guid isPermaLink="true">https://briansunter.com/projects/blackwater-rift</guid><description>A monochrome top-down shooter for the original Game Boy, with a browser shell that runs the same ROM on desktop and mobile.</description><pubDate>Mon, 11 May 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/blackwater-rift-hero.BSRJcLS7_Z1Ys0w2.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;Blackwater Rift is a small top-down shooter built as a real Game Boy ROM and wrapped in a browser player. The browser version uses the same &lt;code&gt;.gb&lt;/code&gt; file, so the page is a playable shell around the hardware-targeted build rather than a remake.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Blackwater Rift running in the browser Game Boy shell&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 800px) 800px, 100vw&quot; width=&quot;800&quot; height=&quot;767&quot; src=&quot;https://briansunter.com/_astro/blackwater-rift-hero.BSRJcLS7_ZGaW0w.webp&quot; srcset=&quot;https://briansunter.com/_astro/blackwater-rift-hero.BSRJcLS7_ZIDdgT.webp 640w, https://briansunter.com/_astro/blackwater-rift-hero.BSRJcLS7_Z1SD0il.webp 750w, https://briansunter.com/_astro/blackwater-rift-hero.BSRJcLS7_ZGaW0w.webp 800w&quot; /&gt;&lt;figcaption&gt;Blackwater Rift running in the browser Game Boy shell&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The game is designed around compact arcade loops: readable enemy waves, charge shots, bombs, pickups, stage bosses, and a password flow that works on original hardware.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Blackwater Rift title screen in the browser Game Boy shell&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 764px) 764px, 100vw&quot; width=&quot;764&quot; height=&quot;800&quot; src=&quot;https://briansunter.com/_astro/blackwater-rift-title.DqU1AUpH_Z5utQL.webp&quot; srcset=&quot;https://briansunter.com/_astro/blackwater-rift-title.DqU1AUpH_Z23Ui68.webp 640w, https://briansunter.com/_astro/blackwater-rift-title.DqU1AUpH_Hc1ES.webp 750w, https://briansunter.com/_astro/blackwater-rift-title.DqU1AUpH_Z5utQL.webp 764w&quot; /&gt;&lt;figcaption&gt;Blackwater Rift title screen in the browser Game Boy shell&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The screenshots below come from the project repo’s generated screenshot set, which makes it easier to compare title, gameplay, and stage coverage as the ROM changes.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Contact sheet of Blackwater Rift stages and bosses&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 984px) 984px, 100vw&quot; width=&quot;984&quot; height=&quot;1770&quot; src=&quot;https://briansunter.com/_astro/blackwater-rift-contact-sheet.CGLVJIOA_YI6kd.webp&quot; srcset=&quot;https://briansunter.com/_astro/blackwater-rift-contact-sheet.CGLVJIOA_gQ8UB.webp 640w, https://briansunter.com/_astro/blackwater-rift-contact-sheet.CGLVJIOA_2gQY9R.webp 750w, https://briansunter.com/_astro/blackwater-rift-contact-sheet.CGLVJIOA_Z1E59nV.webp 828w, https://briansunter.com/_astro/blackwater-rift-contact-sheet.CGLVJIOA_YI6kd.webp 984w&quot; /&gt;&lt;figcaption&gt;Contact sheet of Blackwater Rift stages and bosses&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2&gt;Features&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Monochrome top-down shooter targeting the original Game Boy&lt;/li&gt;
&lt;li&gt;Browser shell for desktop keyboard play and mobile touch controls&lt;/li&gt;
&lt;li&gt;Six stages with enemy waves, bosses, pickups, bombs, and charge shots&lt;/li&gt;
&lt;li&gt;Password and save flow backed by SRAM on the ROM side and local storage in the browser shell&lt;/li&gt;
&lt;li&gt;Host-side tests for portable game logic&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Technology Stack&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;GBDK-2020 and SDCC for the ROM build&lt;/li&gt;
&lt;li&gt;C99 for gameplay logic&lt;/li&gt;
&lt;li&gt;Vite for the browser shell&lt;/li&gt;
&lt;li&gt;&lt;code&gt;gameboy-emulator&lt;/code&gt; for web playback&lt;/li&gt;
&lt;li&gt;Shell scripts and generated screenshots for release checks&lt;/li&gt;
&lt;/ul&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>c-ecs</title><link>https://briansunter.com/projects/c-ecs</link><guid isPermaLink="true">https://briansunter.com/projects/c-ecs</guid><description>A tiny single-header C99 entity-component-system for small games and embedded targets, with fixed capacities and no allocation.</description><pubDate>Mon, 11 May 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/cecs-hero.DXv4r3fb_Z7N2D5.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;c-ecs&lt;/code&gt; is a compact entity-component-system library for small games, toys, and embedded-style programs where allocation and runtime machinery need to stay predictable.&lt;/p&gt;
&lt;p&gt;It ships as a single C99 header, uses caller-owned memory, and leans on compile-time capacities instead of heap allocation. The goal is to make the common ECS workflow feel straightforward without bringing in a framework-sized dependency.&lt;/p&gt;
&lt;h2&gt;Features&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Drop-in &lt;code&gt;cecs.h&lt;/code&gt; single-header library&lt;/li&gt;
&lt;li&gt;No heap allocation or external dependencies&lt;/li&gt;
&lt;li&gt;Compile-time capacities for entities, components, resources, and systems&lt;/li&gt;
&lt;li&gt;Type-aware macros for component storage and queries&lt;/li&gt;
&lt;li&gt;Inline query iteration without callback indirection&lt;/li&gt;
&lt;li&gt;Small presets for constrained targets&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Technology Stack&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;C99&lt;/li&gt;
&lt;li&gt;Make-based test and benchmark targets&lt;/li&gt;
&lt;li&gt;Nix flake for reproducible development shells&lt;/li&gt;
&lt;/ul&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Travel Map</title><link>https://briansunter.com/projects/travel-map</link><guid isPermaLink="true">https://briansunter.com/projects/travel-map</guid><description>An interactive map of the countries, US states, and cities I have visited, powered by a small YAML travel log.</description><pubDate>Mon, 11 May 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/travel-map-hero.DIFA0vEs_Z2bq8H9.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;I wanted a travel page that felt closer to a notebook than a checklist. The map highlights countries I have visited, breaks out individual US states, and plots cities as clickable dots so a trip can be read at country, state, or city level.&lt;/p&gt;
&lt;p&gt;The data lives in a YAML file, which keeps it easy to update without touching the rendering code. The current version tracks 30 countries, 26 US states, and 79 cities.&lt;/p&gt;
&lt;h2&gt;Features&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Country highlighting across the full world map&lt;/li&gt;
&lt;li&gt;Separate US state highlighting instead of treating the United States as one shape&lt;/li&gt;
&lt;li&gt;Clickable city dots with names and locations&lt;/li&gt;
&lt;li&gt;Drag-to-pan and click-then-scroll zoom behavior&lt;/li&gt;
&lt;li&gt;Labels that appear as the map zooms in&lt;/li&gt;
&lt;li&gt;YAML-backed travel log for cities, states, and countries&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Technology Stack&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Astro for the static page&lt;/li&gt;
&lt;li&gt;TypeScript for data validation and map state&lt;/li&gt;
&lt;li&gt;D3 geo utilities for projection and path rendering&lt;/li&gt;
&lt;li&gt;TopoJSON datasets for world countries and US states&lt;/li&gt;
&lt;li&gt;YAML for the editable travel log&lt;/li&gt;
&lt;/ul&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Obsidian Insights</title><link>https://briansunter.com/projects/obsidian-insights</link><guid isPermaLink="true">https://briansunter.com/projects/obsidian-insights</guid><description>An Obsidian plugin that generates live AI writing insights, connections, counter-arguments, and suggested edits while you write.</description><pubDate>Fri, 01 May 2026 23:57:54 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/obsidian-insights-hero._ojVyznz_tvT1r.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;Obsidian Insights is a desktop plugin that watches the active Markdown note and generates live writing feedback in a right sidebar. It can suggest concrete improvements, next ideas, counter-arguments, references, and connections to other notes in the vault.&lt;/p&gt;
&lt;p&gt;I built it to make the AI assistant feel closer to a writing partner than a separate chat window. The plugin stays anchored to the note you are already editing, refreshes as the document changes, and keeps the output organized as structured insight cards instead of a long conversational transcript.&lt;/p&gt;
&lt;h2&gt;Features&lt;/h2&gt;
&lt;h3&gt;Live insight sidebar&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Right-pane sidebar with generated insight cards for the active note&lt;/li&gt;
&lt;li&gt;Manual regenerate command for focused review passes&lt;/li&gt;
&lt;li&gt;Auto-run mode with a debounce and document-change threshold so feedback does not fire on every keystroke&lt;/li&gt;
&lt;li&gt;Per-category target counts for improvements, next ideas, connections, counter-arguments, references, and custom guidance&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Incremental refreshes&lt;/h3&gt;
&lt;p&gt;Instead of regenerating every card after every edit, the plugin keeps a snapshot of the previous run and re-anchors existing insights against the current document. Small changes can update locally, while larger changes trigger a revise call or a full regenerate when the note has drifted too far.&lt;/p&gt;
&lt;p&gt;This keeps token usage lower and makes the sidebar feel less jumpy while writing.&lt;/p&gt;
&lt;h3&gt;Vault-aware research&lt;/h3&gt;
&lt;p&gt;The model can call local vault tools during a run:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Search notes&lt;/li&gt;
&lt;li&gt;Read note slices&lt;/li&gt;
&lt;li&gt;List backlinks and outgoing links&lt;/li&gt;
&lt;li&gt;Inspect note metadata&lt;/li&gt;
&lt;li&gt;Find notes by tag&lt;/li&gt;
&lt;li&gt;List recent notes&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For semantic search, the plugin can use a local &lt;code&gt;qmd&lt;/code&gt; binary when available. If QMD is missing or disabled, it falls back to an in-process lexical scan so the plugin still works without external setup.&lt;/p&gt;
&lt;h3&gt;One-click fixes&lt;/h3&gt;
&lt;p&gt;For concrete edit suggestions, the sidebar can ask the model for a surgical replacement of the cited lines. Fixes are applied through the editor so changes stay visible and undo-friendly.&lt;/p&gt;
&lt;h3&gt;Provider support&lt;/h3&gt;
&lt;p&gt;The plugin supports several model providers through the Vercel AI SDK:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Anthropic&lt;/li&gt;
&lt;li&gt;OpenAI&lt;/li&gt;
&lt;li&gt;Google Gemini&lt;/li&gt;
&lt;li&gt;OpenRouter / OpenAI-compatible endpoints&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Provider credentials stay in the vault-local plugin data file. There is no hidden telemetry; note text is sent only when an insight or auto-fix run is triggered.&lt;/p&gt;
&lt;h2&gt;Technology stack&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;TypeScript Obsidian plugin&lt;/li&gt;
&lt;li&gt;esbuild bundle to a single &lt;code&gt;main.js&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Vercel AI SDK for streaming model calls and tool execution&lt;/li&gt;
&lt;li&gt;Zod schemas for validating model-submitted insight cards&lt;/li&gt;
&lt;li&gt;Obsidian Plugin API for commands, settings, views, editor access, and vault reads&lt;/li&gt;
&lt;li&gt;Optional local QMD process for semantic vault search&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Project shape&lt;/h2&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;plaintext&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;src/&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;├── agent/       # model provider selection, prompts, tool schemas, auto-fix&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;├── runner/      # editor watching, run orchestration, incremental re-anchoring&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;├── ui/          # sidebar view, insight cards, thinking panel, fix application&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;├── util/        # fetch shim, text diffing, qmd process bridge, hashing&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;├── settings.ts  # provider, trigger, search, output, and guardrail settings&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;└── main.ts      # plugin lifecycle and command registration&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The main plugin entry point stays small; most behavior lives in focused modules so the model loop, editor integration, and UI can evolve independently.&lt;/p&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Rainybow</title><link>https://briansunter.com/projects/rainybow</link><guid isPermaLink="true">https://briansunter.com/projects/rainybow</guid><description>A Hawaii rainbow tracker that combines weather, rain chances, cloud cover, humidity, and sun angle to forecast when and where to look.</description><pubDate>Fri, 01 May 2026 02:42:57 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/rainybow-hero.Cnl5Bk2N_b1kO1.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;Rainybow is a location-aware rainbow forecast for Hawaii. It checks current weather, hourly rain chances, cloud cover, humidity, and sun angle, then turns those signals into a simple rainbow score and direction to look.&lt;/p&gt;
&lt;h2&gt;Features&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Current-location forecast with browser geolocation&lt;/li&gt;
&lt;li&gt;Open-Meteo weather data for current, hourly, and daily conditions&lt;/li&gt;
&lt;li&gt;Rainbow scoring based on rain, cloud breaks, humidity, and solar geometry&lt;/li&gt;
&lt;li&gt;Direction guidance for where to look, including anti-solar bearing&lt;/li&gt;
&lt;li&gt;24-hour outlook with hourly chance bars&lt;/li&gt;
&lt;li&gt;Week-ahead summary with daily peak rainbow windows&lt;/li&gt;
&lt;li&gt;Secure-context and Safari-specific location permission guidance&lt;/li&gt;
&lt;li&gt;Responsive dark glass UI with weather and compass visuals&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Technology Stack&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;React 19 + TypeScript&lt;/li&gt;
&lt;li&gt;Bun runtime and bundler&lt;/li&gt;
&lt;li&gt;Tailwind CSS v4&lt;/li&gt;
&lt;li&gt;Lucide React icons&lt;/li&gt;
&lt;li&gt;Radix UI primitives&lt;/li&gt;
&lt;li&gt;Open-Meteo Forecast API&lt;/li&gt;
&lt;/ul&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Obsidian Data Editor</title><link>https://briansunter.com/projects/obsidian-data-editor</link><guid isPermaLink="true">https://briansunter.com/projects/obsidian-data-editor</guid><description>An Obsidian plugin that opens .json, .yaml, and .yml files in a visual tree editor, with inline editing, schema validation, and a CodeMirror source mode.</description><pubDate>Wed, 29 Apr 2026 02:01:05 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/obsidian-data-editor-hero.CiPuXx06_Z1LXFcg.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;Obsidian Data Editor turns &lt;code&gt;.json&lt;/code&gt;, &lt;code&gt;.yaml&lt;/code&gt;, and &lt;code&gt;.yml&lt;/code&gt; files in your vault into a visual, collapsible tree. The plugin registers a custom file view so structured data opens as a browsable hierarchy by default. Edit scalar values inline, add and remove keys, search by key/value/path, and copy JSON Pointer paths. A CodeMirror-backed source mode and a side-by-side split mode are always one click away, so unusual constructs are never trapped behind the GUI.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Obsidian Data Editor split view with JSON schema tree and source&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 2574px) 2574px, 100vw&quot; width=&quot;2574&quot; height=&quot;1514&quot; src=&quot;https://briansunter.com/_astro/obsidian-data-editor-hero.CiPuXx06_Z1Gowb9.webp&quot; srcset=&quot;https://briansunter.com/_astro/obsidian-data-editor-hero.CiPuXx06_15Nciv.webp 640w, https://briansunter.com/_astro/obsidian-data-editor-hero.CiPuXx06_Z13DK6A.webp 750w, https://briansunter.com/_astro/obsidian-data-editor-hero.CiPuXx06_284isj.webp 828w, https://briansunter.com/_astro/obsidian-data-editor-hero.CiPuXx06_Ffiq9.webp 1080w, https://briansunter.com/_astro/obsidian-data-editor-hero.CiPuXx06_Z1NKenj.webp 1280w, https://briansunter.com/_astro/obsidian-data-editor-hero.CiPuXx06_1o6Hx8.webp 1668w, https://briansunter.com/_astro/obsidian-data-editor-hero.CiPuXx06_ZbmsTm.webp 2048w, https://briansunter.com/_astro/obsidian-data-editor-hero.CiPuXx06_1qxEbm.webp 2560w, https://briansunter.com/_astro/obsidian-data-editor-hero.CiPuXx06_Z1Gowb9.webp 2574w&quot; /&gt;&lt;figcaption&gt;Obsidian Data Editor split view with JSON schema tree and source&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;YAML files keep their comments, anchors, aliases, tags, and multi-document structure across edits whenever the operation supports preservation. Schema validation can be enabled per file glob from the settings tab; schemas are loaded from inside the vault, and no network requests are made.&lt;/p&gt;
&lt;h2&gt;Why I built this&lt;/h2&gt;
&lt;p&gt;I keep a lot of structured data in my vault (config files for other plugins, scraped datasets, frontmatter templates, recipe metadata, JSON Schemas for &lt;a href=&quot;https://github.com/briansunter/obsidian-schema&quot;&gt;Obsidian Schema&lt;/a&gt;). Editing them as raw text is fine for a few keys but tedious once the document gets nested or large. I wanted the same thing my &lt;a href=&quot;https://github.com/briansunter/obsidian-csv-editor&quot;&gt;CSV editor&lt;/a&gt; gives me for tabular data: open the file, click around, edit a value, save, all without leaving Obsidian or losing YAML comments.&lt;/p&gt;
&lt;h2&gt;Features&lt;/h2&gt;
&lt;h3&gt;Tree mode&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Collapsible tree of nested objects, arrays, mappings, and sequences&lt;/li&gt;
&lt;li&gt;Inline edit for scalar values (string, number, boolean, null) with type-aware inputs; editing a &lt;code&gt;null&lt;/code&gt; cell auto-detects the typed value’s type&lt;/li&gt;
&lt;li&gt;Inline rename of object keys&lt;/li&gt;
&lt;li&gt;Add property / add item, delete, duplicate, move up/down within a parent&lt;/li&gt;
&lt;li&gt;Type conversion (string ↔ number ↔ boolean ↔ null ↔ object ↔ array) with a confirm prompt for lossy YAML changes&lt;/li&gt;
&lt;li&gt;Keyboard navigation (arrow keys to move, Enter to expand/collapse, double-click to edit a scalar) with ARIA tree semantics&lt;/li&gt;
&lt;li&gt;Search keys, values, and paths with auto-expansion of ancestors&lt;/li&gt;
&lt;li&gt;Copy node path as JSON Pointer&lt;/li&gt;
&lt;li&gt;Undo / redo across tree edits&lt;/li&gt;
&lt;li&gt;Empty-document landing card with one-click root creation (Object / Array / String / Number / true / false / null)&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;YAML preservation&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Comments, anchors, aliases, and tags shown as metadata badges on each row&lt;/li&gt;
&lt;li&gt;Operations preserve comments and anchors when the underlying YAML AST supports it; potentially-lossy edits prompt for confirmation (toggleable in settings)&lt;/li&gt;
&lt;li&gt;Multi-document files exposed as switchable document tabs; all documents are saved together so unedited documents are never dropped&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Source / split mode&lt;/h3&gt;
&lt;p&gt;CodeMirror 6 source editor with JSON / YAML syntax highlighting, bracket matching, fold gutters, and line numbers. Split mode shows the tree and source side by side, so you can navigate visually and drop into raw text whenever you need to.&lt;/p&gt;
&lt;h3&gt;Schema validation&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;JSON Schema validation via &lt;a href=&quot;https://ajv.js.org/&quot;&gt;Ajv&lt;/a&gt; (draft-07 by default)&lt;/li&gt;
&lt;li&gt;Schemas mapped to file globs in the settings tab (&lt;code&gt;pattern =&amp;gt; path/to/schema.json&lt;/code&gt;); patterns use &lt;code&gt;*&lt;/code&gt; (any chars except &lt;code&gt;/&lt;/code&gt;) and &lt;code&gt;**&lt;/code&gt; (any chars)&lt;/li&gt;
&lt;li&gt;Diagnostics surface inline on the affected row, in a diagnostics panel below the tree, and in the status bar&lt;/li&gt;
&lt;li&gt;Vault-local only (no schemas are fetched over the network)&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;File handling&lt;/h3&gt;
&lt;p&gt;Auto-save with configurable debounce (default 500 ms), or manual &lt;code&gt;Save now&lt;/code&gt; from the toolbar. Saving is blocked while the document has parse errors; the “Allow saving invalid source” advanced setting overrides this when you need it.&lt;/p&gt;
&lt;h2&gt;Settings&lt;/h2&gt;
&lt;p&gt;The settings tab is split into general (default mode, auto-save), JSON (indentation, sort keys on save, trailing newline), YAML (show anchors / aliases, confirm lossy operations), schema validation (enable, mapping table), and advanced (allow saving invalid source) sections.&lt;/p&gt;
&lt;h2&gt;Technology stack&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;TypeScript, bundled with esbuild into a single &lt;code&gt;main.js&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;React for the tree UI&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://codemirror.net/&quot;&gt;CodeMirror 6&lt;/a&gt; for the source editor&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://eemeli.org/yaml/&quot;&gt;yaml&lt;/a&gt; for AST-preserving YAML parsing&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://ajv.js.org/&quot;&gt;Ajv&lt;/a&gt; for JSON Schema validation&lt;/li&gt;
&lt;li&gt;Obsidian Plugin API (custom &lt;code&gt;FileView&lt;/code&gt;, &lt;code&gt;registerExtensions&lt;/code&gt;, vault read/modify)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://bun.sh/&quot;&gt;Bun&lt;/a&gt; for install, scripts, and the adapter contract smoke harness&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;License&lt;/h2&gt;
&lt;p&gt;0BSD&lt;/p&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Obsidian CSV Editor</title><link>https://briansunter.com/projects/obsidian-csv-editor</link><guid isPermaLink="true">https://briansunter.com/projects/obsidian-csv-editor</guid><description>An Obsidian plugin that opens .csv files in a spreadsheet-like grid with keyboard navigation, range selection, copy/paste, sorting, and debounced auto-save.</description><pubDate>Tue, 28 Apr 2026 18:39:03 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/obsidian-csv-editor-hero.BRGt-Uzg_2u1XAz.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;Obsidian CSV Editor turns any &lt;code&gt;.csv&lt;/code&gt; file in your vault into an editable spreadsheet. The default Obsidian renderer treats CSVs as plain text; this plugin registers a custom view so they open as a grid with keyboard navigation, range selection, copy/paste, sortable columns, and debounced auto-save back to disk.&lt;/p&gt;
&lt;p&gt;It’s built on &lt;a href=&quot;https://github.com/adazzle/react-data-grid&quot;&gt;react-data-grid&lt;/a&gt; for fast virtualised rendering, so wide files (thousands of rows / dozens of columns) stay smooth.&lt;/p&gt;
&lt;h2&gt;Why I built this&lt;/h2&gt;
&lt;p&gt;I keep a lot of tabular data in my vault (workout logs, reading lists, finance trackers, scraped datasets), and editing them as raw text is tedious. The existing CSV plugins I tried either didn’t handle keyboard-first editing well, didn’t support range copy/paste against external spreadsheets, or rendered slowly on bigger files. I wanted something that felt like a real cell editor: tab between cells, paste a block from Google Sheets, sort a column, and have it save back transparently without leaving Obsidian.&lt;/p&gt;
&lt;h2&gt;Features&lt;/h2&gt;
&lt;h3&gt;Native CSV view&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;.csv&lt;/code&gt; files open in the grid by default; no command is needed. The plugin registers a &lt;code&gt;FileView&lt;/code&gt; against the &lt;code&gt;csv&lt;/code&gt; extension so Obsidian routes them to it automatically.&lt;/p&gt;
&lt;h3&gt;Keyboard-first editing&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Arrow keys to navigate&lt;/li&gt;
&lt;li&gt;Tab / Shift+Tab to move between cells (wraps to next/previous row at the end)&lt;/li&gt;
&lt;li&gt;Enter / Shift+Enter to commit and move down/up&lt;/li&gt;
&lt;li&gt;Type to start editing; F2 or Enter to enter edit mode explicitly&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Range selection and clipboard&lt;/h3&gt;
&lt;p&gt;Shift+Click, Shift+Arrow keys, or click-and-drag to select a rectangular range. Selected cells are highlighted, and Cmd/Ctrl+C/X/V act on the whole range. Pasting tab-separated content (e.g. from Excel or Google Sheets) fills the grid starting at the active cell, expanding the row count as needed.&lt;/p&gt;
&lt;h3&gt;Right-click context menu&lt;/h3&gt;
&lt;p&gt;Insert / delete rows and columns at the click position, clear the active cell, or run copy / cut / paste over the current selection.&lt;/p&gt;
&lt;h3&gt;Column sorting&lt;/h3&gt;
&lt;p&gt;Click any header to sort ascending / descending. Sort is non-destructive; saving writes back the original on-disk row order, so a sort is a view-only operation.&lt;/p&gt;
&lt;h3&gt;Configurable delimiter&lt;/h3&gt;
&lt;p&gt;Comma, semicolon, tab, or pipe (set in plugin settings). The parser is RFC 4180 compliant: fields containing the delimiter, double quotes, or newlines are properly quoted on save, and embedded quotes are doubled.&lt;/p&gt;
&lt;h3&gt;Debounced auto-save&lt;/h3&gt;
&lt;p&gt;Edits are debounced (default 300 ms, configurable 100–2000 ms) and written back via the Obsidian vault API. Auto-save can be toggled off, in which case the toolbar’s &lt;strong&gt;Save&lt;/strong&gt; button writes on demand.&lt;/p&gt;
&lt;h3&gt;Theme-aware styling&lt;/h3&gt;
&lt;p&gt;Colors and borders are wired to Obsidian’s CSS variables, so the grid follows your active theme (light, dark, or any community theme) without extra config.&lt;/p&gt;
&lt;h3&gt;Mobile compatible&lt;/h3&gt;
&lt;p&gt;No desktop-only APIs, so it works on iOS and Android.&lt;/p&gt;
&lt;h2&gt;Technology stack&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;TypeScript, bundled with esbuild into a single &lt;code&gt;main.js&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;React 19 + &lt;a href=&quot;https://github.com/adazzle/react-data-grid&quot;&gt;react-data-grid&lt;/a&gt; for the virtualised grid&lt;/li&gt;
&lt;li&gt;Obsidian Plugin API (&lt;code&gt;FileView&lt;/code&gt;, &lt;code&gt;registerExtensions&lt;/code&gt;, vault read/modify)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://bun.sh/&quot;&gt;Bun&lt;/a&gt; for install, scripts, and CI&lt;/li&gt;
&lt;li&gt;ESLint with &lt;code&gt;eslint-plugin-obsidianmd&lt;/code&gt; for plugin-specific lint rules&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Project shape&lt;/h2&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;plaintext&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;src/&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;├── main.ts            # Plugin entry: registers the view + settings tab&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;├── csvView.tsx        # FileView that mounts the React app into the leaf&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;├── CSVEditorApp.tsx   # Grid component, selection / clipboard / sorting logic&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;├── csvParser.ts       # RFC 4180 parse / serialize&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;├── clipboardUtils.ts  # Range + TSV helpers for copy/paste&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;└── settings.ts        # Settings tab and defaults&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The plugin lifecycle file (&lt;code&gt;main.ts&lt;/code&gt;) stays tiny: load settings, register the view against the &lt;code&gt;csv&lt;/code&gt; extension, attach the settings tab. All real editing logic lives in the React app.&lt;/p&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Obsidian Schema</title><link>https://briansunter.com/projects/obsidian-schema</link><guid isPermaLink="true">https://briansunter.com/projects/obsidian-schema</guid><description>An Obsidian plugin that validates note frontmatter against user-defined JSON Schema rules, with tag-driven selectors, a results sidebar, and inline error reporting.</description><pubDate>Mon, 27 Apr 2026 02:22:20 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/obsidian-schema-hero.BY4SGNG3_20CsY7.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;Obsidian Schema is a plugin that brings real, declarative validation to your vault. You define rules as JSON Schema in a single file at the vault root (&lt;code&gt;note-schema.json&lt;/code&gt;), and the plugin checks every note’s frontmatter against them, flagging missing required fields, type mismatches, bad enum values, malformed dates, and more.&lt;/p&gt;
&lt;p&gt;Each rule has two parts: a &lt;strong&gt;selector&lt;/strong&gt; that decides which notes it applies to (typically tag-driven, e.g. “any note tagged &lt;code&gt;book&lt;/code&gt;”) and a &lt;strong&gt;schema&lt;/strong&gt; those notes must satisfy. Rules don’t fire on notes they don’t match, so you can add structure to a vault gradually without flagging every existing note.&lt;/p&gt;
&lt;h2&gt;Why I built this&lt;/h2&gt;
&lt;p&gt;I have a vault of 5,000+ notes: books, movies, recipes, recruiter contacts, project pages, trip logs. Over the years the frontmatter drifted: some book notes had &lt;code&gt;author&lt;/code&gt;, others didn’t; some used &lt;code&gt;rating&lt;/code&gt; 0–5, others 0–10; recruiter contacts were missing dates. Dataview queries silently broke. I wanted a way to declare “every note tagged &lt;code&gt;book&lt;/code&gt; must have an author and a positive page count” and have Obsidian tell me which ones are out of conformance.&lt;/p&gt;
&lt;p&gt;JSON Schema is the right vocabulary for this. It’s battle-tested, expressive, and there’s a fast validator (Ajv) I could embed.&lt;/p&gt;
&lt;h2&gt;Features&lt;/h2&gt;
&lt;h3&gt;Tag-driven rules&lt;/h3&gt;
&lt;p&gt;The default selector pattern matches notes by tag. A rule for book notes only fires on notes tagged &lt;code&gt;book&lt;/code&gt; (frontmatter or inline &lt;code&gt;#book&lt;/code&gt;):&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;json&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;  &quot;id&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;book-note&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;  &quot;selector&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;    &quot;type&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;object&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;    &quot;properties&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;      &quot;tags&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: { &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;&quot;type&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;array&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;&quot;contains&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: { &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;&quot;const&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;book&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; } }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;    &quot;required&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: [&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;tags&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;  &quot;schema&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;    &quot;type&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;object&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;    &quot;required&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: [&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;author&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;pages&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;    &quot;properties&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;      &quot;pages&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;:  { &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;&quot;type&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;integer&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;&quot;minimum&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;      &quot;rating&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: { &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;&quot;anyOf&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: [{ &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;&quot;type&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;null&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; }, { &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;&quot;type&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;integer&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;&quot;minimum&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;&quot;maximum&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;10&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; }] }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Selectors are themselves JSON Schemas, so &lt;code&gt;anyOf&lt;/code&gt;, &lt;code&gt;not&lt;/code&gt;, and folder-anchored patterns (via the synthetic &lt;code&gt;$file.path&lt;/code&gt;) are all available when you need them.&lt;/p&gt;
&lt;h3&gt;Results sidebar&lt;/h3&gt;
&lt;p&gt;A right-pane view groups every issue by file with the rule name, frontmatter path, and a human-readable message. Click a file to jump to it. The status bar shows the running count.&lt;/p&gt;
&lt;h3&gt;Live re-validation&lt;/h3&gt;
&lt;p&gt;Edit a note and the plugin re-validates just that file. Edit the schema and the entire vault is re-checked. The full-vault scan is debounced and coalesced so back-to-back saves don’t pile up runs.&lt;/p&gt;
&lt;h3&gt;Helpful error messages&lt;/h3&gt;
&lt;p&gt;Ajv’s default messages are technical (&lt;code&gt;must NOT have additional properties&lt;/code&gt;); the plugin formats them into readable form (&lt;code&gt;must have required property &quot;author&quot;&lt;/code&gt;, &lt;code&gt;must be one of: planned, active, blocked, done&lt;/code&gt;).&lt;/p&gt;
&lt;h3&gt;Offline verification script&lt;/h3&gt;
&lt;p&gt;Because the rule compiler, data builder, and validator are pure functions, you can drive them from a Bun script and audit the entire vault in a single pass. This is useful when authoring a new rule to see how many notes match before reloading the plugin.&lt;/p&gt;
&lt;h2&gt;What it does NOT do&lt;/h2&gt;
&lt;p&gt;By design:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;No autofix.&lt;/strong&gt; Issues are reported only; your notes are not modified.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;No body validation.&lt;/strong&gt; The plugin checks frontmatter (and inline tags). Markdown body content, links, and embeds are not in scope.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;No &lt;code&gt;additionalProperties: false&lt;/code&gt; by default.&lt;/strong&gt; Real notes accumulate ad-hoc fields; locking them down spams the sidebar.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Technology stack&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;TypeScript, bundled with esbuild&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://ajv.js.org/&quot;&gt;Ajv 8&lt;/a&gt; + &lt;code&gt;ajv-formats&lt;/code&gt; for JSON Schema validation&lt;/li&gt;
&lt;li&gt;Obsidian Plugin API&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://bun.sh/&quot;&gt;Bun&lt;/a&gt; for the test runner; &lt;code&gt;bun test --coverage&lt;/code&gt; reports 100% line coverage on the pure validation modules&lt;/li&gt;
&lt;li&gt;Vitest-style unit tests covering the selector engine, schema compiler, and a fully mocked validation service&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Project shape&lt;/h2&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;plaintext&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;src/&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;├── note-data.ts          # builds the note → JSON object the validator sees&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;├── schema-config.ts      # parses note-schema.json, compiles each rule with Ajv&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;├── validator.ts          # selector predicate + schema check + error formatting&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;├── validation-service.ts # vault scanning, file lifecycle, subscription pub/sub&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;└── views/                # sidebar UI&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The plugin is intentionally split into pure modules and Obsidian-API integration shims, so the validation logic is unit-testable without a running Obsidian instance.&lt;/p&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>CoolRSS</title><link>https://briansunter.com/projects/coolrss</link><guid isPermaLink="true">https://briansunter.com/projects/coolrss</guid><description>A local-first RSS reader and read-it-later desktop app (Tauri 2 shell, Rust core, React frontend, SQLite with FTS5 search, and a CLI that shares the same business logic).</description><pubDate>Wed, 08 Apr 2026 17:04:46 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/coolrss-hero.BOzS3Ks6_Z1HjEyf.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;CoolRSS is a desktop RSS reader and read-it-later app I run locally. It subscribes to feeds, fetches articles on a schedule, extracts the full body from the original page so I can read offline, and groups things I want to keep into collections. Everything lives in a SQLite database on disk with no account or server.&lt;/p&gt;
&lt;p&gt;I built it because hosted readers keep dying or pivoting, and I wanted one app that handled both feed reading and the “save this article to read later” workflow without juggling Pocket, Instapaper, and a third RSS app. Same database, same search, same keyboard shortcuts.&lt;/p&gt;
&lt;h2&gt;Features&lt;/h2&gt;
&lt;h3&gt;Feeds and articles&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;RSS and Atom subscriptions with OPML import and export&lt;/li&gt;
&lt;li&gt;Per-domain rate limiting and concurrent fetching with backpressure&lt;/li&gt;
&lt;li&gt;Full-text search over article bodies via SQLite FTS5&lt;/li&gt;
&lt;li&gt;Smart feeds: All Saved, Today, Unread, Starred, plus tag and collection views&lt;/li&gt;
&lt;li&gt;Filter by feed, collection, tag, read state, or date range&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Read-it-later&lt;/h3&gt;
&lt;p&gt;Saving an arbitrary URL pulls the page, runs it through the content extractor, and stores a clean reading copy alongside subscribed feed articles. Saved items can be tagged, starred, dropped into collections, and searched the same way feed articles are.&lt;/p&gt;
&lt;h3&gt;Collections and tags&lt;/h3&gt;
&lt;p&gt;Collections are folders for things I want to keep (Read Later, Reference, Documentation, Tutorials, Inspiration, Research). Tags are orthogonal labels (&lt;code&gt;important&lt;/code&gt;, &lt;code&gt;follow-up&lt;/code&gt;, &lt;code&gt;interesting&lt;/code&gt;) that can be color-coded in the sidebar. Drag-and-drop reordering for both, with the order persisted to the database.&lt;/p&gt;
&lt;h3&gt;Feed health&lt;/h3&gt;
&lt;p&gt;Fetch outcomes are classified into &lt;code&gt;Healthy&lt;/code&gt;, &lt;code&gt;TransientError&lt;/code&gt;, and &lt;code&gt;PermanentError&lt;/code&gt;. Feeds with repeated permanent errors (404, 410, parse failures) are auto-deactivated after a strike threshold; transient errors (5xx, 429, timeouts) get more grace. Error counts reset on a successful fetch.&lt;/p&gt;
&lt;h3&gt;Content extraction&lt;/h3&gt;
&lt;p&gt;A reader pipeline takes raw HTML and produces a clean article: strips chrome, resolves relative URLs against the source, picks out the canonical title, and returns sanitized HTML the frontend renders inside a styled article view. Code blocks keep their syntax highlighting.&lt;/p&gt;
&lt;h3&gt;CLI&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;coolrss-cli&lt;/code&gt; is a separate binary that links the same Rust core. Same database file (with &lt;code&gt;--db &amp;lt;path&amp;gt;&lt;/code&gt; to target the desktop app’s data directory), same fetch and parse logic, same OPML import. Useful for scripting feed adds, batch fetches from cron, or piping article JSON into an LLM workflow.&lt;/p&gt;
&lt;h2&gt;Architecture&lt;/h2&gt;
&lt;p&gt;The repo is a Cargo workspace plus a Vite/React frontend:&lt;/p&gt;

























&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Path&lt;/th&gt;&lt;th&gt;What it is&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;coolrss-core/&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Shared Rust library (db, models, parser, fetcher, reader, OPML, health)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;coolrss-cli/&lt;/code&gt;&lt;/td&gt;&lt;td&gt;CLI binary built on &lt;code&gt;coolrss-core&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;src-tauri/&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Tauri 2 backend, thin command wrappers around &lt;code&gt;coolrss-core&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;src/&lt;/code&gt;&lt;/td&gt;&lt;td&gt;React frontend, rendering only&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;Business logic lives in Rust. The Tauri command layer and the CLI are both glue around the same core, which means a feature only has to be implemented and tested once. The TypeScript side is deliberately dumb: it renders, it dispatches commands, it caches query results.&lt;/p&gt;
&lt;p&gt;SQL migrations sit in &lt;code&gt;coolrss-core/migrations/NNN_name.sql&lt;/code&gt; and run on every app or CLI start via &lt;code&gt;sqlx&lt;/code&gt;’s migrator.&lt;/p&gt;
&lt;h2&gt;Frontend&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;React 19 with TanStack Router, Query, and Virtual&lt;/li&gt;
&lt;li&gt;shadcn/ui on Base UI primitives, Tailwind CSS v4&lt;/li&gt;
&lt;li&gt;Article selection driven by React state, not URL params, so switching articles doesn’t remount the reader pane and re-fetch&lt;/li&gt;
&lt;li&gt;Optimistic cache updates via &lt;code&gt;setQueryData&lt;/code&gt; / &lt;code&gt;setQueriesData&lt;/code&gt; for instant UI on read/star/save toggles&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Technology stack&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Rust 2024 with &lt;code&gt;sqlx&lt;/code&gt;, &lt;code&gt;reqwest&lt;/code&gt;, &lt;code&gt;feed-rs&lt;/code&gt;, &lt;code&gt;scraper&lt;/code&gt;, &lt;code&gt;tokio&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Tauri 2 desktop shell, packaged for macOS, Windows, and Linux&lt;/li&gt;
&lt;li&gt;React 19 + Vite 7 + TanStack Router/Query/Virtual&lt;/li&gt;
&lt;li&gt;SQLite with FTS5 for storage and search&lt;/li&gt;
&lt;li&gt;shadcn/ui + Tailwind CSS v4 for the UI&lt;/li&gt;
&lt;li&gt;Bun as the package manager and frontend test runner&lt;/li&gt;
&lt;/ul&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Pogo Panic</title><link>https://briansunter.com/projects/pogo-panic</link><guid isPermaLink="true">https://briansunter.com/projects/pogo-panic</guid><description>A tiny Game Boy arcade platformer built with GBDK-2020. You&apos;re always bouncing on a pogo stick: steer, stomp cracked blocks, grab the battery, reach the exit.</description><pubDate>Wed, 01 Apr 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/pogo-panic-hero.BCCfAwIN_Z2ck1VU.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;Pogo Panic is a real DMG Game Boy game. The player is always bouncing on a pogo stick; you can’t stop, only steer. The build is a 32 KB ROM compiled with GBDK-2020 that runs unmodified on original hardware, flashcarts, and standalone emulators. A small Vite browser runner loads the same &lt;code&gt;.gb&lt;/code&gt; file through &lt;code&gt;gameboy-emulator&lt;/code&gt; so anyone can try it without a flashcart.&lt;/p&gt;
&lt;p&gt;The ROM is the canonical artifact: gameplay rules, level generation, save handling, and music all live in C. The browser shell is treated as a demo and never re-implements game logic.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Pogo Panic Adventure room gameplay screenshot&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 700px) 700px, 100vw&quot; width=&quot;700&quot; height=&quot;627&quot; src=&quot;https://briansunter.com/_astro/pogo-panic-gameplay.qWGDVOqc_ZYUrMI.webp&quot; srcset=&quot;https://briansunter.com/_astro/pogo-panic-gameplay.qWGDVOqc_Z1zyXlw.webp 640w, https://briansunter.com/_astro/pogo-panic-gameplay.qWGDVOqc_ZYUrMI.webp 700w&quot; /&gt;&lt;figcaption&gt;Pogo Panic Adventure room gameplay screenshot&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2&gt;Gameplay&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Steer left and right; you can’t stop bouncing&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A&lt;/strong&gt; stomps to break cracked blocks and rocks&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;B&lt;/strong&gt; tilts for a short hop&lt;/li&gt;
&lt;li&gt;Collect the golden battery, then reach the exit door&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Modes&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Adventure&lt;/strong&gt;: 80 curated fixed rooms with SRAM-backed unlocks&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Panic&lt;/strong&gt;: endless procedurally generated rooms with rising hazard pressure&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Time Trial&lt;/strong&gt;: race the Adventure rooms with a best-time record per room&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Technology Stack&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;C with GBDK-2020 targeting the DMG (Game Boy) CPU&lt;/li&gt;
&lt;li&gt;Vite + &lt;code&gt;gameboy-emulator&lt;/code&gt; for the browser runner&lt;/li&gt;
&lt;li&gt;Node’s built-in &lt;code&gt;node:test&lt;/code&gt; for ROM and web-module smoke tests&lt;/li&gt;
&lt;li&gt;SRAM for save data (Adventure unlocks, best times, Panic best depth)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;How It Works&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;src-rom/main.c&lt;/code&gt; is the full game: gameplay, level generation, menus, 4-channel music, and rendering. &lt;code&gt;make&lt;/code&gt; compiles it to &lt;code&gt;dist/pogo-panic.gb&lt;/code&gt; and copies the ROM into &lt;code&gt;public/roms/&lt;/code&gt; so the browser shell can fetch it. The web side is strictly host code: emulator boot, input mapping, SRAM persistence, and a level debug viewer that consumes JSON dumped from the C source. The constraint that everything must run on a real DMG keeps scope honest: 160×144 screen, 4-color palette, fixed-tick bounce physics.&lt;/p&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Audiobook Player</title><link>https://briansunter.com/projects/audio</link><guid isPermaLink="true">https://briansunter.com/projects/audio</guid><description>A cross-platform audiobook player built with Tauri, Rust, and React. Streams from Google Drive, plays offline, syncs progress, and runs on macOS, Windows, Linux, and iOS.</description><pubDate>Mon, 16 Mar 2026 03:02:53 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/audio-hero.CEvo4_UK_ZE7vFH.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;Audiobook Player is a desktop and iOS audiobook app built with Tauri 2. It connects to Google Drive, detects audiobook folders, downloads chapters for offline listening, and plays them back with the controls you’d expect from a dedicated reader: speed control, skip and seek, bookmarks, sleep timer, and a “continue listening” shelf that picks up exactly where you left off.&lt;/p&gt;
&lt;p&gt;I built it because I wanted to listen to my own audiobook collection without uploading it to a third-party service. The files live in a Drive folder I already pay for; this app is the playback layer on top.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Audiobook Player now-playing screen on iOS&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1000px) 1000px, 100vw&quot; width=&quot;1000&quot; height=&quot;1936&quot; src=&quot;https://briansunter.com/_astro/audio-now-playing.Du_kLHUl_ZRsjLM.webp&quot; srcset=&quot;https://briansunter.com/_astro/audio-now-playing.Du_kLHUl_Z28TQGz.webp 640w, https://briansunter.com/_astro/audio-now-playing.Du_kLHUl_Z2eXRU3.webp 750w, https://briansunter.com/_astro/audio-now-playing.Du_kLHUl_Z1GryX4.webp 828w, https://briansunter.com/_astro/audio-now-playing.Du_kLHUl_ZRsjLM.webp 1000w&quot; /&gt;&lt;figcaption&gt;Audiobook Player now-playing screen on iOS&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2&gt;Features&lt;/h2&gt;
&lt;h3&gt;Google Drive integration&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;OAuth 2.0 with PKCE, no client secret stored on device&lt;/li&gt;
&lt;li&gt;Browse Drive folders, mark favorites for quick access&lt;/li&gt;
&lt;li&gt;Auto-detect audiobooks from folder structure, including chapter ordering&lt;/li&gt;
&lt;li&gt;Pull metadata from MP3 ID3 tags or MP4 atoms when available&lt;/li&gt;
&lt;li&gt;Cover art from a Drive image, the audio file itself, or picked manually&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Library management&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Local SQLite database for books, chapters, bookmarks, and progress&lt;/li&gt;
&lt;li&gt;Sort by title, author, recently added, or recently played&lt;/li&gt;
&lt;li&gt;Search across the library&lt;/li&gt;
&lt;li&gt;Edit title, author, and narrator after import&lt;/li&gt;
&lt;li&gt;A book wizard walks through detection, metadata, and cover selection on add&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Playback&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Symphonia decoding for MP3, AAC, and ISO MP4 / M4B containers&lt;/li&gt;
&lt;li&gt;Variable speed playback with a curated set of speed presets&lt;/li&gt;
&lt;li&gt;Skip forward / back, fine seek, and gapless chapter transitions&lt;/li&gt;
&lt;li&gt;Bookmarks with timestamps and notes&lt;/li&gt;
&lt;li&gt;Sleep timer&lt;/li&gt;
&lt;li&gt;Native iOS audio session and lock-screen controls via a Swift bridge&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Offline downloads&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Per-chapter downloads with progress events streamed to the UI&lt;/li&gt;
&lt;li&gt;Configurable cache size with eviction&lt;/li&gt;
&lt;li&gt;Clear individual chapters, whole books, or reset progress without re-downloading&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Cross-platform&lt;/h3&gt;
&lt;p&gt;The same React UI runs on every target. The Rust core handles Drive, the database, the cache, and audio decoding; on iOS, a Swift library plugs into the system audio APIs so playback continues in the background and on the lock screen.&lt;/p&gt;
&lt;h2&gt;Technology stack&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Tauri 2 with Rust on the backend, React 19 + TypeScript on the frontend&lt;/li&gt;
&lt;li&gt;Vite, Tailwind CSS v4, shadcn/ui, Radix primitives, lucide-react icons&lt;/li&gt;
&lt;li&gt;&lt;code&gt;rusqlite&lt;/code&gt; (bundled SQLite) for storage, &lt;code&gt;symphonia&lt;/code&gt; for decoding, &lt;code&gt;rodio&lt;/code&gt; for desktop output&lt;/li&gt;
&lt;li&gt;&lt;code&gt;oauth2&lt;/code&gt; crate with PKCE, &lt;code&gt;tauri-plugin-deep-link&lt;/code&gt; and &lt;code&gt;tauri-plugin-web-auth&lt;/code&gt; for the Drive auth flow&lt;/li&gt;
&lt;li&gt;Swift bridge via &lt;code&gt;swift-rs&lt;/code&gt; for iOS-specific audio session handling&lt;/li&gt;
&lt;li&gt;Targets macOS, Windows, Linux, and iOS 15+&lt;/li&gt;
&lt;/ul&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Deadman</title><link>https://briansunter.com/projects/deadman</link><guid isPermaLink="true">https://briansunter.com/projects/deadman</guid><description>A dead-man&apos;s switch for Prometheus / Alertmanager, running on Cloudflare Workers and Durable Objects. Alerts you when your monitoring goes silent.</description><pubDate>Mon, 09 Mar 2026 03:38:17 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/deadman-hero-card.FPcVQcyU_20PBtO.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;Prometheus can’t alert you about itself. If the whole observability stack falls over, Alertmanager isn’t going to send you the alert that says “Alertmanager is down.” Deadman is the dead-man’s switch that lives outside it: Alertmanager sends a periodic Watchdog heartbeat to Deadman, and if that heartbeat stops arriving, Deadman pages you.&lt;/p&gt;
&lt;p&gt;It runs on Cloudflare Workers + Durable Objects, so it’s on completely independent infrastructure from whatever you’re monitoring.&lt;/p&gt;
&lt;h2&gt;How It Works&lt;/h2&gt;
&lt;figure&gt;&lt;img alt=&quot;Deadman alert pipeline diagram&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1536px) 1536px, 100vw&quot; width=&quot;1536&quot; height=&quot;1024&quot; src=&quot;https://briansunter.com/_astro/deadman-explainer.DoYt8kEb_ZVoO67.webp&quot; srcset=&quot;https://briansunter.com/_astro/deadman-explainer.DoYt8kEb_1d7Dlq.webp 640w, https://briansunter.com/_astro/deadman-explainer.DoYt8kEb_zJWbe.webp 750w, https://briansunter.com/_astro/deadman-explainer.DoYt8kEb_2tVriV.webp 828w, https://briansunter.com/_astro/deadman-explainer.DoYt8kEb_Z268aTD.webp 1080w, https://briansunter.com/_astro/deadman-explainer.DoYt8kEb_16DPTz.webp 1280w, https://briansunter.com/_astro/deadman-explainer.DoYt8kEb_ZVoO67.webp 1536w&quot; /&gt;&lt;figcaption&gt;Deadman alert pipeline diagram&lt;/figcaption&gt;&lt;/figure&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Heartbeat&lt;/strong&gt;: Alertmanager sends a Watchdog alert to Deadman every minute, resetting a countdown timer (default 5 min).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Alert&lt;/strong&gt;: If the timer expires with no heartbeat, Deadman fires notifications on every configured channel (Discord, Slack, Telegram, Email). Re-alerts on a cooldown (default 15 min).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Recovery&lt;/strong&gt;: When heartbeats resume after an alert, Deadman sends a recovery notification.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The whole switch is a single Durable Object. Each heartbeat schedules a DO alarm via &lt;code&gt;setAlarm()&lt;/code&gt;, and Cloudflare handles the persistence and timing in the DO’s SQLite storage (no polling, no cron, no always-on workers).&lt;/p&gt;
&lt;h2&gt;Features&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Discord, Slack, Telegram, and Cloudflare Email Routing&lt;/li&gt;
&lt;li&gt;No always-on processes (Durable Object alarms do all the scheduling)&lt;/li&gt;
&lt;li&gt;One-click Workers deploy or via Wrangler CLI&lt;/li&gt;
&lt;li&gt;Configurable heartbeat timeout and re-alert cooldown&lt;/li&gt;
&lt;li&gt;Templated alert messages&lt;/li&gt;
&lt;li&gt;Endpoints for health, status, webhook, ping, and reset&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Technology Stack&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;TypeScript on Cloudflare Workers + Durable Objects&lt;/li&gt;
&lt;li&gt;Zod for runtime validation&lt;/li&gt;
&lt;li&gt;Bun for local dev and tests&lt;/li&gt;
&lt;li&gt;Wrangler for deployment&lt;/li&gt;
&lt;/ul&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Caliber</title><link>https://briansunter.com/projects/caliber</link><guid isPermaLink="true">https://briansunter.com/projects/caliber</guid><description>A web reader for your Calibre library. Cursor pagination and virtualised lists keep it fast on million-book collections; EPUB and PDF readers are built in.</description><pubDate>Wed, 04 Mar 2026 03:28:14 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/caliber-hero.BfDjp7ps_27LVVF.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;Caliber is a small web app that points at your existing &lt;a href=&quot;https://calibre-ebook.com/&quot;&gt;Calibre&lt;/a&gt; library (same SQLite database, same on-disk layout) and gives you a fast browser UI on top of it. The Calibre desktop app starts to drag once your library gets large; Caliber uses cursor-based pagination instead of &lt;code&gt;OFFSET&lt;/code&gt; queries and virtualises the list view so scrolling stays smooth even on million-book collections. It also has built-in EPUB and PDF readers, so you can actually read in the browser instead of downloading first.&lt;/p&gt;
&lt;h2&gt;Features&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Cursor pagination instead of &lt;code&gt;OFFSET&lt;/code&gt; for speed at any library size&lt;/li&gt;
&lt;li&gt;Built-in EPUB reader (epub.js) and PDF viewer (pdf.js)&lt;/li&gt;
&lt;li&gt;Download any format Calibre has stored&lt;/li&gt;
&lt;li&gt;Virtualised list rendering with TanStack Virtual&lt;/li&gt;
&lt;li&gt;CLI for searching, browsing, and downloading from the terminal&lt;/li&gt;
&lt;li&gt;MCP server so Claude can search the library&lt;/li&gt;
&lt;li&gt;REST API: paginated listing, search, covers, downloads, stats&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Technology Stack&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Bun for runtime, bundling, and SQLite (&lt;code&gt;bun:sqlite&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;React 19 with TanStack Router, Query, Virtual, and Table&lt;/li&gt;
&lt;li&gt;Tailwind CSS v4 with shadcn/ui&lt;/li&gt;
&lt;li&gt;epub.js and pdf.js for in-browser reading&lt;/li&gt;
&lt;li&gt;Biome for lint and format&lt;/li&gt;
&lt;/ul&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Oracle World</title><link>https://briansunter.com/projects/oracle-world</link><guid isPermaLink="true">https://briansunter.com/projects/oracle-world</guid><description>OpenTofu modules for Oracle Cloud&apos;s Always Free tier. One `apply` gives you a 4-core ARM box with 24 GB RAM, 200 GB storage, and optional MySQL, S3, monitoring, and budget alerts.</description><pubDate>Tue, 17 Feb 2026 04:54:56 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/oracle-world-hero.DCus1vYT_aeSPs.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;Oracle Cloud has the most generous always-free tier of any of the big providers, most notably a 4-core ARM box with 24 GB of RAM that doesn’t time out. The catch is that wiring it up in OCI’s console is unpleasant. Oracle World is the OpenTofu/Terraform code I wrote so I could &lt;code&gt;tofu apply&lt;/code&gt; myself a working ARM server in one shot, with optional MySQL HeatWave, S3-compatible object storage, idle-detection monitoring, and budget alerts on top.&lt;/p&gt;
&lt;h2&gt;Resources&lt;/h2&gt;





































&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Resource&lt;/th&gt;&lt;th&gt;Spec&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Compute&lt;/td&gt;&lt;td&gt;VM.Standard.A1.Flex (4 OCPUs, 24 GB RAM)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Boot Storage&lt;/td&gt;&lt;td&gt;50 GB + weekly backups&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Block Storage&lt;/td&gt;&lt;td&gt;150 GB at &lt;code&gt;/data&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;MySQL HeatWave&lt;/td&gt;&lt;td&gt;50 GB, private subnet (optional)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Object Storage&lt;/td&gt;&lt;td&gt;30 GB S3-compatible (optional)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Monitoring&lt;/td&gt;&lt;td&gt;Idle-detection alarms, so OCI doesn’t reclaim the box (optional)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Budget Alerts&lt;/td&gt;&lt;td&gt;Email on any spend + at 50% / 80% / 100% (optional)&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;h2&gt;Architecture&lt;/h2&gt;
&lt;figure&gt;&lt;img alt=&quot;Oracle World cloud infrastructure diagram&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1536px) 1536px, 100vw&quot; width=&quot;1536&quot; height=&quot;1024&quot; src=&quot;https://briansunter.com/_astro/oracle-world-explainer.CkJRr-ql_1vW4vg.webp&quot; srcset=&quot;https://briansunter.com/_astro/oracle-world-explainer.CkJRr-ql_ZEz9jD.webp 640w, https://briansunter.com/_astro/oracle-world-explainer.CkJRr-ql_1bqkzh.webp 750w, https://briansunter.com/_astro/oracle-world-explainer.CkJRr-ql_Z1Ymd7W.webp 828w, https://briansunter.com/_astro/oracle-world-explainer.CkJRr-ql_Z2tIMLV.webp 1080w, https://briansunter.com/_astro/oracle-world-explainer.CkJRr-ql_Rit1x.webp 1280w, https://briansunter.com/_astro/oracle-world-explainer.CkJRr-ql_1vW4vg.webp 1536w&quot; /&gt;&lt;figcaption&gt;Oracle World cloud infrastructure diagram&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The compute instance sits in a public subnet because OCI NAT gateways aren’t free. MySQL HeatWave, when enabled, lives in a private subnet with no internet route (you reach it via SSH tunnel). SSH is closed by default; whitelist your IP with &lt;code&gt;just ssh-allow&lt;/code&gt; and revoke with &lt;code&gt;just ssh-revoke&lt;/code&gt;.&lt;/p&gt;
&lt;h2&gt;Features&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;One-command deploy: &lt;code&gt;just init &amp;amp;&amp;amp; just plan &amp;amp;&amp;amp; just apply&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Open and close SSH access by IP from the command line&lt;/li&gt;
&lt;li&gt;A Claude Code &lt;code&gt;/setup&lt;/code&gt; walks you through the variables interactively&lt;/li&gt;
&lt;li&gt;Stays inside Oracle’s Always Free limits by default&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Technology Stack&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;HCL (OpenTofu / Terraform)&lt;/li&gt;
&lt;li&gt;Oracle Cloud Infrastructure (OCI)&lt;/li&gt;
&lt;li&gt;Just task runner&lt;/li&gt;
&lt;/ul&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>RSS AI</title><link>https://briansunter.com/projects/rss-ai</link><guid isPermaLink="true">https://briansunter.com/projects/rss-ai</guid><description>A CLI RSS/Atom feed reader with OPML support, smart caching, full-text search, content extraction, broken link repair, and an interactive TUI.</description><pubDate>Fri, 13 Feb 2026 05:05:50 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/rss-ai-hero.bGD9l2Xk_1dDKfO.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;RSS AI is a command-line RSS and Atom feed reader. It manages subscriptions in a local SQLite database, fetches feeds with HTTP conditional requests so it does not re-download what has not changed, extracts full article content from the original page, and ships an interactive terminal UI for reading.&lt;/p&gt;
&lt;p&gt;I built it because most feed readers want to be a server or a hosted service, and I wanted something I could run as &lt;code&gt;bunx rss-ai&lt;/code&gt; against a local database, script with JSON output, and pipe into an LLM workflow when I felt like it.&lt;/p&gt;
&lt;h2&gt;Features&lt;/h2&gt;
&lt;h3&gt;Feeds and articles&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;RSS and Atom feed support with lenient parsing&lt;/li&gt;
&lt;li&gt;OPML import and export covering 1.0, 1.1, and 2.0 formats&lt;/li&gt;
&lt;li&gt;Per-domain rate limiting and configurable concurrent fetching&lt;/li&gt;
&lt;li&gt;Full-text search across articles via SQLite FTS5&lt;/li&gt;
&lt;li&gt;Filter by feed, category, author, read or unread, starred, broken links, or date&lt;/li&gt;
&lt;li&gt;Flexible date formats: ISO, relative (&lt;code&gt;yesterday&lt;/code&gt;, &lt;code&gt;this week&lt;/code&gt;), expressions (&lt;code&gt;3 days ago&lt;/code&gt;), and ranges&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Smart caching&lt;/h3&gt;
&lt;p&gt;Three layers minimize bandwidth:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;HTTP conditional requests using ETag and If-Modified-Since&lt;/li&gt;
&lt;li&gt;Content hashing (MD5) to detect changes when servers ignore cache headers&lt;/li&gt;
&lt;li&gt;In-memory deduplication on &lt;code&gt;guid&lt;/code&gt; and &lt;code&gt;link&lt;/code&gt; to prevent duplicate inserts&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;code&gt;--force&lt;/code&gt; bypasses all of them when needed.&lt;/p&gt;
&lt;h3&gt;Content extraction and link repair&lt;/h3&gt;
&lt;p&gt;Articles can fetch their full body from the original page rather than relying on the (often truncated) feed entry. A repair pass tries HTTP/HTTPS swaps, &lt;code&gt;www&lt;/code&gt; toggling, and an archive.org fallback for links that no longer resolve, and can flag or remove articles that stay broken.&lt;/p&gt;
&lt;h3&gt;Auto-deactivation on persistent errors&lt;/h3&gt;
&lt;p&gt;Feeds with repeated permanent errors (404, 410, 403, parse failures) are deactivated after three strikes; transient errors (5xx, 429, timeouts, DNS) get five. Error counts reset on a successful fetch, and a feed can be reactivated with a single command.&lt;/p&gt;
&lt;h3&gt;Interactive TUI&lt;/h3&gt;
&lt;p&gt;A &lt;code&gt;rss tui&lt;/code&gt; command launches a terminal UI built on &lt;code&gt;@opentui/react&lt;/code&gt; with keyboard navigation, markdown rendering, search, sort cycling, and three resizable layout modes. Keys follow vim-style conventions (&lt;code&gt;j&lt;/code&gt;/&lt;code&gt;k&lt;/code&gt;, &lt;code&gt;g&lt;/code&gt;/&lt;code&gt;G&lt;/code&gt;, &lt;code&gt;/&lt;/code&gt; for search) alongside the standard arrow keys.&lt;/p&gt;
&lt;h3&gt;Scripting and agent workflows&lt;/h3&gt;
&lt;p&gt;Every command takes a &lt;code&gt;-j, --json&lt;/code&gt; flag that emits structured output, and a &lt;code&gt;--quiet&lt;/code&gt; flag that suppresses everything else. The CLI is designed to compose with shell pipelines and LLM tool-call loops (list articles, pipe the JSON into a model, mark them read, and so on).&lt;/p&gt;
&lt;h2&gt;Quick start&lt;/h2&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;bash&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;# Run directly with bunx&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;bunx&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; rss-ai&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; feed&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; add&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; https://hnrss.org/frontpage&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;bunx&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; rss-ai&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; fetch&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; all&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;bunx&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; rss-ai&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; article&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; list&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; --unread&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;bunx&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; rss-ai&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; tui&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The database auto-initializes on first use and runs Drizzle migrations on every boot.&lt;/p&gt;
&lt;h2&gt;Technology stack&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;TypeScript on the Bun runtime, distributed on npm as &lt;code&gt;rss-ai&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;SQLite with Drizzle ORM for storage and migrations, FTS5 for search&lt;/li&gt;
&lt;li&gt;&lt;code&gt;commander&lt;/code&gt; for the CLI, &lt;code&gt;@opentui/react&lt;/code&gt; for the TUI&lt;/li&gt;
&lt;li&gt;&lt;code&gt;xml2js&lt;/code&gt; for feed parsing, &lt;code&gt;cheerio&lt;/code&gt; and &lt;code&gt;turndown&lt;/code&gt; for content extraction&lt;/li&gt;
&lt;li&gt;&lt;code&gt;bun build --compile&lt;/code&gt; produces a standalone binary&lt;/li&gt;
&lt;/ul&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Paratran</title><link>https://briansunter.com/projects/paratran</link><guid isPermaLink="true">https://briansunter.com/projects/paratran</guid><description>A CLI, REST API, and MCP server for fast audio transcription on Apple Silicon, built on parakeet-mlx and the Parakeet TDT model.</description><pubDate>Thu, 12 Feb 2026 01:18:33 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/paratran-hero.B5e5F1sU_HPL9H.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;Paratran is a transcription tool for macOS on Apple Silicon. It wraps NVIDIA’s Parakeet TDT model (running through &lt;a href=&quot;https://github.com/senstella/parakeet-mlx&quot;&gt;parakeet-mlx&lt;/a&gt;) in three interfaces: a CLI for one-off jobs, a REST API for long-running services, and an MCP server so Claude Code or Claude Desktop can transcribe audio as a tool call.&lt;/p&gt;
&lt;p&gt;I built it because Whisper is slow on a laptop and most of the fast alternatives are cloud services. The default Parakeet model hits 6.34% average WER across eight English benchmarks, supports 25 languages, and runs roughly 30x faster than Whisper on the same hardware via MLX. It’s fast enough that a one-hour recording transcribes in well under a minute on an M-series chip.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Paratran architecture diagram&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1280px) 1280px, 100vw&quot; width=&quot;1280&quot; height=&quot;854&quot; src=&quot;https://briansunter.com/_astro/paratran-diagram.Cx1Lt_HD_Z2fi5bS.webp&quot; srcset=&quot;https://briansunter.com/_astro/paratran-diagram.Cx1Lt_HD_ZKaF78.webp 640w, https://briansunter.com/_astro/paratran-diagram.Cx1Lt_HD_Z1nxmhk.webp 750w, https://briansunter.com/_astro/paratran-diagram.Cx1Lt_HD_vD7Pn.webp 828w, https://briansunter.com/_astro/paratran-diagram.Cx1Lt_HD_ZmRXca.webp 1080w, https://briansunter.com/_astro/paratran-diagram.Cx1Lt_HD_Z2fi5bS.webp 1280w&quot; /&gt;&lt;figcaption&gt;Paratran architecture diagram&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2&gt;Features&lt;/h2&gt;
&lt;h3&gt;CLI&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Transcribe one file or a batch in a single command&lt;/li&gt;
&lt;li&gt;Output as plain text, JSON, SRT, or WebVTT (or all four at once)&lt;/li&gt;
&lt;li&gt;Greedy or beam search decoding with full control over beam size, length penalty, patience, and duration reward&lt;/li&gt;
&lt;li&gt;Chunking for long audio with configurable overlap so sentence boundaries survive joins&lt;/li&gt;
&lt;li&gt;Optional sentence splitting by max words, max duration, or silence gap&lt;/li&gt;
&lt;li&gt;BF16 by default with an &lt;code&gt;--fp32&lt;/code&gt; flag for environments that need it&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Client mode (no per-file model reload)&lt;/h3&gt;
&lt;p&gt;The model takes a few seconds to load. Reloading it for every file is wasteful, so the same &lt;code&gt;paratran&lt;/code&gt; binary doubles as a client: start &lt;code&gt;paratran serve&lt;/code&gt; once, then point subsequent invocations at it with &lt;code&gt;-s http://localhost:8000&lt;/code&gt; (or &lt;code&gt;PARATRAN_SERVER&lt;/code&gt; in the environment) and they hand the file off over HTTP and print the result. The CLI surface is identical either way.&lt;/p&gt;
&lt;h3&gt;REST API&lt;/h3&gt;
&lt;p&gt;A FastAPI server exposes &lt;code&gt;/health&lt;/code&gt; and &lt;code&gt;/transcribe&lt;/code&gt;. Upload a wav, mp3, flac, m4a, ogg, or webm file and get back the text plus per-sentence timing and per-token timestamps as JSON. All decoding and sentence-splitting options are query parameters, and interactive docs ship at &lt;code&gt;/docs&lt;/code&gt;.&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;bash&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;curl&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; -X&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; POST&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; http://localhost:8000/transcribe&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; -F&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &quot;file=@recording.m4a&quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3&gt;MCP server&lt;/h3&gt;
&lt;p&gt;The same package installs &lt;code&gt;paratran-mcp&lt;/code&gt;, an MCP server that exposes a &lt;code&gt;transcribe&lt;/code&gt; tool to any MCP client. Stdio is the default (drop a few lines into &lt;code&gt;.claude/settings.json&lt;/code&gt; and Claude Code can transcribe audio files in-place), and a streamable HTTP transport is available for remote or multi-client setups.&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;json&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;  &quot;mcpServers&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;    &quot;paratran&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;      &quot;command&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;uvx&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;      &quot;args&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: [&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;--from&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;paratran&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;paratran-mcp&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h2&gt;Quick start&lt;/h2&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;bash&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;# Run without installing&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;uvx&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; paratran&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; recording.wav&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;# Or install as a tool&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;uv&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; tool&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; install&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; paratran&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;paratran&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; recording.wav&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;# Start the server once, transcribe many files instantly&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;paratran&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; serve&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; &amp;amp;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;paratran&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; -s&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; http://localhost:8000&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; --output-format&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; all&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; recording.wav&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The default model (&lt;code&gt;parakeet-tdt-0.6b-v3&lt;/code&gt;) downloads on first use into the HuggingFace cache. &lt;code&gt;--cache-dir&lt;/code&gt; or &lt;code&gt;PARATRAN_MODEL_DIR&lt;/code&gt; redirects it to an external drive when the local SSD is tight.&lt;/p&gt;
&lt;h2&gt;Technology stack&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Python 3.11+, distributed on PyPI as &lt;code&gt;paratran&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/senstella/parakeet-mlx&quot;&gt;parakeet-mlx&lt;/a&gt; for inference, running on Apple’s MLX framework&lt;/li&gt;
&lt;li&gt;FastAPI and Uvicorn for the REST server&lt;/li&gt;
&lt;li&gt;The official &lt;code&gt;mcp&lt;/code&gt; Python SDK for the MCP server, with stdio and streamable-HTTP transports&lt;/li&gt;
&lt;li&gt;macOS on M1/M2/M3/M4 (the MLX backend is Apple Silicon only)&lt;/li&gt;
&lt;/ul&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Z.AI CLI</title><link>https://briansunter.com/projects/z-cli</link><guid isPermaLink="true">https://briansunter.com/projects/z-cli</guid><description>Unified command-line interface and MCP server for Z.AI services: image generation, OCR, vision, web search, web reader, and Zread code research.</description><pubDate>Thu, 12 Feb 2026 01:07:24 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/z-cli-hero.B0ZpO9m9_bfWSP.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;Z.AI CLI is a single command-line tool that wraps the Z.AI service catalog (image generation, OCR, vision analysis, web search, web reader, and code research via Zread) and exposes the same tools as a Model Context Protocol server for Claude Code. One install, one API key, eight tools.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Z.AI CLI capabilities overview&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1536px) 1536px, 100vw&quot; width=&quot;1536&quot; height=&quot;1024&quot; src=&quot;https://briansunter.com/_astro/z-cli-explainer.C1i__Vsg_ZbC2Ar.webp&quot; srcset=&quot;https://briansunter.com/_astro/z-cli-explainer.C1i__Vsg_Z2dnjT7.webp 640w, https://briansunter.com/_astro/z-cli-explainer.C1i__Vsg_1yBOa1.webp 750w, https://briansunter.com/_astro/z-cli-explainer.C1i__Vsg_Z16jGrF.webp 828w, https://briansunter.com/_astro/z-cli-explainer.C1i__Vsg_1eJo0C.webp 1080w, https://briansunter.com/_astro/z-cli-explainer.C1i__Vsg_Z1lC0YD.webp 1280w, https://briansunter.com/_astro/z-cli-explainer.C1i__Vsg_ZbC2Ar.webp 1536w&quot; /&gt;&lt;figcaption&gt;Z.AI CLI capabilities overview&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2&gt;Features&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Image Generation&lt;/strong&gt;: Generate images from prompts with quality and size controls&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;OCR&lt;/strong&gt;: Extract text from images and PDFs (URLs or local paths)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Vision&lt;/strong&gt;: Ask natural-language questions about images&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Web Search&lt;/strong&gt;: Query the web with recency and result-count filters&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Web Reader&lt;/strong&gt;: Fetch and parse web pages into clean text or markdown&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Zread Code Research&lt;/strong&gt;: Search docs, get repo structure, and read files from any GitHub repo&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;MCP Server&lt;/strong&gt;: All tools exposed to Claude Code with selectable subsets (&lt;code&gt;mcp web&lt;/code&gt;, &lt;code&gt;mcp zread&lt;/code&gt;, etc.)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Zero Install&lt;/strong&gt;: Run via &lt;code&gt;bunx @briansunter/z-cli&lt;/code&gt; without installing globally&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;CLI Usage&lt;/h2&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;bash&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;# Image generation&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;bunx&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; @briansunter/z-cli&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; image&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &quot;a sunset over mountains&quot;&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; --quality&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; hd&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; --size&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; 1280x1280&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;# OCR: extract text from images and PDFs&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;bunx&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; @briansunter/z-cli&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; ocr&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; ./document.pdf&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;# Vision: analyze images&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;bunx&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; @briansunter/z-cli&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; vision&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; ./photo.png&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &quot;Describe this image&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;# Web search and reader&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;bunx&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; @briansunter/z-cli&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; search&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &quot;Claude Code MCP server&quot;&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; --count&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 5&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; --recency&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; oneWeek&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;bunx&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; @briansunter/z-cli&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; read&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; https://bun.com&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; --format&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; text&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; --no-images&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;# Code research via Zread&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;bunx&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; @briansunter/z-cli&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; zread&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; search&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; facebook/react&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &quot;hooks&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;bunx&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; @briansunter/z-cli&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; zread&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; structure&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; vercel/next.js&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;bunx&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; @briansunter/z-cli&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; zread&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; read&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; vercel/next.js&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; package.json&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h2&gt;MCP Server&lt;/h2&gt;
&lt;p&gt;Run the full MCP server or scope it to a single capability; this keeps Claude Code’s tool surface small.&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;bash&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;bunx&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; @briansunter/z-cli&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; mcp&lt;/span&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;           # All 8 tools&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;bunx&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; @briansunter/z-cli&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; mcp&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; image&lt;/span&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;     # generate_image only&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;bunx&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; @briansunter/z-cli&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; mcp&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; web&lt;/span&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;       # web_search + web_reader&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;bunx&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; @briansunter/z-cli&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; mcp&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; zread&lt;/span&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;     # search_doc, get_repo_structure, read_file&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Add to your &lt;code&gt;.mcp.json&lt;/code&gt; for Claude Code:&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;json&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;  &quot;mcpServers&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;    &quot;z-ai&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;      &quot;command&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;bunx&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;      &quot;args&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: [&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;@briansunter/z-cli&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;mcp&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;      &quot;env&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: { &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;&quot;Z_AI_API_KEY&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;${Z_AI_API_KEY}&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h2&gt;Technology Stack&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;TypeScript on Bun&lt;/li&gt;
&lt;li&gt;Z.AI REST APIs (image, OCR, vision, search, reader, Zread)&lt;/li&gt;
&lt;li&gt;Model Context Protocol (stdio transport)&lt;/li&gt;
&lt;li&gt;npm / bunx distribution&lt;/li&gt;
&lt;/ul&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Kungfu</title><link>https://briansunter.com/projects/kungfu</link><guid isPermaLink="true">https://briansunter.com/projects/kungfu</guid><description>A library of reusable skills (prompts plus references and templates) that any Agent Skills–compatible coding agent can install and use.</description><pubDate>Sat, 24 Jan 2026 03:10:14 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/kungfu-hero.C3FnWX7G_Z10SzWi.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;Kungfu is a collection of skills (structured prompts bundled with reference material, templates, and small helper scripts) that any agent supporting the Agent Skills format can install. Claude Code, Cursor, Windsurf, and anything else that loads skills can pick them up and run them.&lt;/p&gt;
&lt;p&gt;Skills cover the kinds of one-off business and SaaS tasks I keep ending up doing by hand: validating an idea, picking a domain, drafting pricing pages, writing a Show HN, reading SaaS metrics. Each one packages the prompts and the supporting files an agent actually needs to get a useful answer.&lt;/p&gt;
&lt;h2&gt;Features&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;16 skills across idea validation, pricing, retention, launches, legal, and metrics&lt;/li&gt;
&lt;li&gt;Each skill is a self-contained directory: instructions, references, templates, and optional scripts&lt;/li&gt;
&lt;li&gt;Works with any Agent Skills–compatible host&lt;/li&gt;
&lt;li&gt;Install with &lt;code&gt;npx skills add kungfu/&amp;lt;skill-name&amp;gt;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;CI runs type-checks, lint, format, and skill validation on every push&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Available Skills&lt;/h2&gt;
&lt;p&gt;Idea-finding, domain-name discovery, pricing-page design, launch playbooks, SaaS-metrics analysis, retention plays, community growth, lead research, legal-doc generation, solo-founder ops, and a handful of others.&lt;/p&gt;
&lt;h2&gt;Technology Stack&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;TypeScript and Python for validation and code-gen helpers&lt;/li&gt;
&lt;li&gt;Bun runtime&lt;/li&gt;
&lt;li&gt;Just for tasks&lt;/li&gt;
&lt;li&gt;Biome and Prettier for formatting&lt;/li&gt;
&lt;li&gt;GitHub Actions for CI&lt;/li&gt;
&lt;/ul&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>SReader</title><link>https://briansunter.com/projects/sreader</link><guid isPermaLink="true">https://briansunter.com/projects/sreader</guid><description>An RSVP speed reader where words flash one at a time at a fixed point, so your eyes don&apos;t have to track across lines.</description><pubDate>Fri, 16 Jan 2026 05:43:34 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/sreader-hero.BMbsfa82_14fRD.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;SReader is a Rapid Serial Visual Presentation (RSVP) reader. Instead of moving your eyes across a page, words flash one at a time at a single focal point. Whether RSVP actually makes you a faster reader is debatable; either way, it’s a fun way to chew through long articles.&lt;/p&gt;
&lt;h2&gt;Features&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Speed adjustable from 100 to 1000+ WPM&lt;/li&gt;
&lt;li&gt;Show 1–5 words per flash&lt;/li&gt;
&lt;li&gt;Saved texts in localStorage&lt;/li&gt;
&lt;li&gt;Keyboard-driven controls&lt;/li&gt;
&lt;li&gt;Dark theme&lt;/li&gt;
&lt;li&gt;Position, word count, and time-remaining indicator&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;How It Works&lt;/h2&gt;
&lt;p&gt;Each word is positioned with its “optimal recognition point” (the letter your eye naturally lands on) aligned to a fixed marker on screen. Your gaze stays put while the words come to you.&lt;/p&gt;
&lt;h2&gt;Controls&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Play / pause&lt;/li&gt;
&lt;li&gt;Speed up / down&lt;/li&gt;
&lt;li&gt;Rewind to the start&lt;/li&gt;
&lt;li&gt;Words-per-flash 1–5&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Technology Stack&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;TanStack Start (React framework)&lt;/li&gt;
&lt;li&gt;TanStack Router&lt;/li&gt;
&lt;li&gt;Tailwind CSS, shadcn/ui&lt;/li&gt;
&lt;li&gt;Vitest, Biome&lt;/li&gt;
&lt;/ul&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Subs: Email Signup API</title><link>https://briansunter.com/projects/subs</link><guid isPermaLink="true">https://briansunter.com/projects/subs</guid><description>An email-signup API that writes straight into a Google Sheet. Cloudflare Turnstile blocks bots, Bun or Workers as the runtime, no separate database to operate.</description><pubDate>Tue, 13 Jan 2026 06:14:47 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/subs-hero.DK7OpO0p_ZequdT.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;Subs is a tiny email-signup API. You POST an email, it writes a row to a Google Sheet, and you stop having to operate a database for what was always just “a list of email addresses.” It also wires in Cloudflare Turnstile so spam bots get filtered before the row is written, and ships embeddable widgets so you can drop the form into a static site without touching the backend.&lt;/p&gt;
&lt;h2&gt;Features&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Google Sheets storage&lt;/strong&gt;: no separate database; writes go straight to a sheet, with auto-tab-creation and dedup across tabs.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cloudflare Turnstile&lt;/strong&gt;: invisible bot protection; no checkbox CAPTCHAs.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Multiple embed surfaces&lt;/strong&gt;: iframe widget, inline HTML, raw POST endpoint, or a JS SDK.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Extended metadata&lt;/strong&gt;: name, source, tags, and arbitrary metadata alongside the email.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Bulk endpoint&lt;/strong&gt;: accept up to 100 signups in one request.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Observability built in&lt;/strong&gt;: Prometheus metrics, structured JSON logs, health and stats endpoints.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Deployment Options&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Bun / Node server with hot reload for local dev&lt;/li&gt;
&lt;li&gt;Cloudflare Workers for an edge deploy&lt;/li&gt;
&lt;li&gt;Multi-stage Dockerfile + Compose&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;API Endpoints&lt;/h2&gt;





































&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Endpoint&lt;/th&gt;&lt;th&gt;Description&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;POST /api/signup&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Basic email signup&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;POST /api/signup/extended&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Signup with name, source, tags&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;POST /api/signup/bulk&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Bulk signups (up to 100)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;GET /api/stats&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Signup statistics&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;GET /api/health&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Health check&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;GET /api/config&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Configuration info&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;GET /api/metrics&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Prometheus metrics&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;h2&gt;Technology Stack&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Runtime&lt;/strong&gt;: Bun&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Framework&lt;/strong&gt;: ElysiaJS&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Validation&lt;/strong&gt;: Zod&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Bot Protection&lt;/strong&gt;: Cloudflare Turnstile&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Storage&lt;/strong&gt;: Google Sheets API (REST, no SDK)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Auth&lt;/strong&gt;: Google service account, JWT signing via &lt;code&gt;jose&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monitoring&lt;/strong&gt;: Prometheus + Pino&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Testing&lt;/strong&gt;: Vitest (unit + integration)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Deployment&lt;/strong&gt;: Cloudflare Workers via Wrangler&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Links&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/briansunter/subs&quot;&gt;GitHub Repository&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Tracer</title><link>https://briansunter.com/projects/tracer</link><guid isPermaLink="true">https://briansunter.com/projects/tracer</guid><description>Trace artwork directly on your screen. Load any reference image, dial the opacity down, and draw over it on phone or tablet.</description><pubDate>Sat, 10 Jan 2026 05:49:33 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/tracer-hero.DkZ5yHsF_1HuG8v.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;Tracer turns your phone or tablet into a tracing surface. Load a reference image, set its opacity, and draw on top of it. This approach is useful for learning to draw by copying master works, the same way figure-drawing classes have used lightboxes forever, just without the lightbox.&lt;/p&gt;
&lt;h2&gt;Features&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Import any image as a reference layer&lt;/li&gt;
&lt;li&gt;Adjustable reference-layer opacity&lt;/li&gt;
&lt;li&gt;Brush tools with size and color controls&lt;/li&gt;
&lt;li&gt;Save and export traced work&lt;/li&gt;
&lt;li&gt;Touch input on mobile&lt;/li&gt;
&lt;li&gt;Dark theme for low-light practice&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Technology Stack&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;React + TypeScript&lt;/li&gt;
&lt;li&gt;HTML5 Canvas&lt;/li&gt;
&lt;li&gt;Touch event handling for mobile&lt;/li&gt;
&lt;li&gt;Responsive layout&lt;/li&gt;
&lt;/ul&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Moodboard</title><link>https://briansunter.com/projects/moodboard</link><guid isPermaLink="true">https://briansunter.com/projects/moodboard</guid><description>An infinite-canvas moodboard with sticky notes and images. Pan, zoom, drop things wherever they make sense.</description><pubDate>Sat, 27 Dec 2025 14:05:46 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/moodboard-hero.CECE6X0a_16If3m.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;An infinite-canvas board for sticky notes and images. No grid, no hierarchy. Just a surface big enough that you can lay things out spatially the way you’d think about them on a wall.&lt;/p&gt;
&lt;h2&gt;Features&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Infinite pan and zoom&lt;/li&gt;
&lt;li&gt;Sticky notes with rich-text editing&lt;/li&gt;
&lt;li&gt;Image upload and placement&lt;/li&gt;
&lt;li&gt;Drag and drop arrangement&lt;/li&gt;
&lt;li&gt;Works on desktop and mobile&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Technology Stack&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Bun&lt;/li&gt;
&lt;li&gt;React 18 + TypeScript&lt;/li&gt;
&lt;li&gt;Konva.js for canvas rendering&lt;/li&gt;
&lt;li&gt;TanStack Router for file-based routing&lt;/li&gt;
&lt;li&gt;Tailwind CSS&lt;/li&gt;
&lt;/ul&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>ArcFetch</title><link>https://briansunter.com/projects/arcfetch</link><guid isPermaLink="true">https://briansunter.com/projects/arcfetch</guid><description>Fetch a URL, get clean Markdown back. Plain HTTP first, Playwright fallback for JS-heavy pages, and quality gates that throw out paywalls and login walls before they reach you.</description><pubDate>Thu, 25 Dec 2025 06:23:56 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/arcfetch-hero.DmttLXFK_1OVfwk.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;ArcFetch is a URL-to-Markdown tool I built because every AI workflow I had eventually needed “give me the readable text from this page” and every existing option either choked on JavaScript-rendered sites, returned a wall of nav and ads, or silently handed back a paywall stub. It runs Mozilla Readability under plain HTTP first, retries with a stealthed Playwright browser when that fails, and rejects boilerplate, paywalls, and login walls before returning anything.&lt;/p&gt;
&lt;h2&gt;How It Works&lt;/h2&gt;
&lt;figure&gt;&lt;img alt=&quot;ArcFetch pipeline diagram&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1536px) 1536px, 100vw&quot; width=&quot;1536&quot; height=&quot;1024&quot; src=&quot;https://briansunter.com/_astro/arcfetch-explainer.GHAb5iiT_1aRjPd.webp&quot; srcset=&quot;https://briansunter.com/_astro/arcfetch-explainer.GHAb5iiT_Z1GNVXA.webp 640w, https://briansunter.com/_astro/arcfetch-explainer.GHAb5iiT_2bPfn6.webp 750w, https://briansunter.com/_astro/arcfetch-explainer.GHAb5iiT_1YAQIU.webp 828w, https://briansunter.com/_astro/arcfetch-explainer.GHAb5iiT_10r1Dz.webp 1080w, https://briansunter.com/_astro/arcfetch-explainer.GHAb5iiT_1QvOTj.webp 1280w, https://briansunter.com/_astro/arcfetch-explainer.GHAb5iiT_1aRjPd.webp 1536w&quot; /&gt;&lt;figcaption&gt;ArcFetch pipeline diagram&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Four stages in order: fetch, extract, quality-gate, output. Plain HTTP runs first because it’s fast and free; if it returns blank or low-quality content, ArcFetch retries with Playwright in stealth mode. The quality gates score each result 0–100 and reject boilerplate, paywalls, login walls, and error pages before anything is saved.&lt;/p&gt;
&lt;h2&gt;Features&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;HTTP first, automatic Playwright fallback for JS-heavy sites&lt;/li&gt;
&lt;li&gt;Quality scoring (0–100) with detection for boilerplate, login walls, paywalls, and error pages&lt;/li&gt;
&lt;li&gt;Anti-bot escape hatches: stealth plugin, viewport / timezone / locale rotation, realistic headers&lt;/li&gt;
&lt;li&gt;Markdown output via Mozilla Readability + Turndown (typically 90–95% smaller than the raw HTML)&lt;/li&gt;
&lt;li&gt;Cache-to-temp workflow: stash a fetch in a temp folder, promote to &lt;code&gt;docs/&lt;/code&gt; once you’ve checked it&lt;/li&gt;
&lt;li&gt;Link extraction so you can batch-fetch every link on a page you’ve already cached&lt;/li&gt;
&lt;li&gt;Available as both a CLI and an MCP server (6 tools)&lt;/li&gt;
&lt;li&gt;Output as plain text, JSON, file path, or summary&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Technology Stack&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;TypeScript on Bun&lt;/li&gt;
&lt;li&gt;Mozilla Readability for content extraction&lt;/li&gt;
&lt;li&gt;Playwright (loaded only when the fallback fires)&lt;/li&gt;
&lt;li&gt;Turndown for HTML-to-Markdown conversion&lt;/li&gt;
&lt;/ul&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>wraptc: Multi-Provider AI Coding CLI</title><link>https://briansunter.com/projects/wraptc</link><guid isPermaLink="true">https://briansunter.com/projects/wraptc</guid><description>A unified CLI wrapper that routes coding requests across Gemini, OpenCode, Qwen Code, and Codex with automatic fallback, daily-credit tracking, and a built-in MCP server.</description><pubDate>Wed, 24 Dec 2025 23:00:36 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/wraptc-hero.DiuXDvDP_Z151r5q.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;wraptc is a single CLI that fronts every other coding-agent CLI on my machine. Instead of remembering which tool has free quota left today, which one supports streaming JSON, and which one needs a different flag for file context, I run &lt;code&gt;wraptc ask -p &quot;...&quot;&lt;/code&gt; and it picks the best available provider (Gemini CLI, OpenCode, Qwen Code, Codex, or any custom binary I’ve registered), falls back automatically when one runs out of credits or starts erroring, and tracks how many Claude tokens I’ve avoided spending in the process.&lt;/p&gt;
&lt;p&gt;It also ships an MCP server, so Claude Desktop (and any other MCP client) can hand off coding subtasks to the same routing layer.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Wraptc provider routing architecture diagram&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1536px) 1536px, 100vw&quot; width=&quot;1536&quot; height=&quot;1024&quot; src=&quot;https://briansunter.com/_astro/wraptc-explainer.BKIq1CgR_1WiBGj.webp&quot; srcset=&quot;https://briansunter.com/_astro/wraptc-explainer.BKIq1CgR_Z1LBG8t.webp 640w, https://briansunter.com/_astro/wraptc-explainer.BKIq1CgR_1HgDo9.webp 750w, https://briansunter.com/_astro/wraptc-explainer.BKIq1CgR_22wUAV.webp 828w, https://briansunter.com/_astro/wraptc-explainer.BKIq1CgR_KCBp1.webp 1080w, https://briansunter.com/_astro/wraptc-explainer.BKIq1CgR_Zn79kh.webp 1280w, https://briansunter.com/_astro/wraptc-explainer.BKIq1CgR_1WiBGj.webp 1536w&quot; /&gt;&lt;figcaption&gt;Wraptc provider routing architecture diagram&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2&gt;Why I built this&lt;/h2&gt;
&lt;p&gt;I use Claude as my main coding agent, but a lot of day-to-day requests (boilerplate generation, “explain this function”, “write a unit test for X”) don’t actually need Claude. The free tiers on Gemini, Qwen, and Codex are more than enough for those, and using them keeps my Claude usage focused on the work that’s worth it.&lt;/p&gt;
&lt;p&gt;The problem is that each of those CLIs has its own UX. Different prompt flags, different ways to attach files, different streaming formats, different error semantics, different daily limits, and zero awareness of each other. Manually rotating between them (“Gemini’s out, try Qwen, wait, Qwen errored twice in a row, fall back to Codex”) is not how I want to spend my time.&lt;/p&gt;
&lt;p&gt;wraptc is the layer that makes that boring. One command, one JSON shape, automatic routing.&lt;/p&gt;
&lt;h2&gt;Features&lt;/h2&gt;
&lt;h3&gt;Multi-provider routing with automatic fallback&lt;/h3&gt;
&lt;p&gt;A priority list defines the default order (&lt;code&gt;[&quot;gemini&quot;, &quot;opencode&quot;, &quot;qwen-code&quot;, &quot;codex&quot;]&lt;/code&gt; in my config). The router picks the first provider that is installed, hasn’t hit its daily request limit, isn’t currently in cooldown from consecutive errors, and supports the requested capability. If a request fails mid-flight with a retryable error, it falls back to the next provider transparently.&lt;/p&gt;
&lt;p&gt;Per-mode overrides let me say “for &lt;code&gt;test&lt;/code&gt; mode, prefer Codex over Gemini” without changing the global order.&lt;/p&gt;
&lt;h3&gt;Daily credit tracking&lt;/h3&gt;
&lt;p&gt;Each provider has a configurable &lt;code&gt;dailyRequestLimit&lt;/code&gt; and &lt;code&gt;resetHourUtc&lt;/code&gt;. wraptc persists a per-provider counter in &lt;code&gt;~/.config/wraptc/state.json&lt;/code&gt; and stops routing to a provider once its limit is hit, until the reset hour rolls around. No more “oops, I burned through Gemini’s free tier at 11pm and didn’t notice.”&lt;/p&gt;
&lt;h3&gt;Error-threshold blacklisting&lt;/h3&gt;
&lt;p&gt;After N consecutive failures from a provider, wraptc blacklists it for a cooldown window. This catches the common failure mode where a provider’s API is flaking but each individual request still takes 10+ seconds to time out. Without it, the router would eat that latency on every request until I noticed.&lt;/p&gt;
&lt;h3&gt;Tokens-saved tracking&lt;/h3&gt;
&lt;p&gt;Every successful delegation logs an estimate of the Claude tokens I would have spent if I’d run the same prompt through Claude. Over a week it adds up to a real number, and it’s the closest thing I have to a metric for “did this thing pay for itself.”&lt;/p&gt;
&lt;h3&gt;Unified JSON-first API&lt;/h3&gt;
&lt;p&gt;Every provider returns the same shape:&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;json&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;  &quot;provider&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;qwen-code&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;  &quot;text&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;...generated code...&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;  &quot;usage&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: { &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;&quot;inputTokens&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;45&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;&quot;outputTokens&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;23&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;  &quot;meta&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: { &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;&quot;elapsedMs&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;1250&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;That’s true whether the underlying CLI emits structured JSON natively, only supports streaming JSONL, or just dumps text to stdout. wraptc has per-provider adapters that normalize all of those into the same envelope. Streaming is supported in JSONL or plain-text mode.&lt;/p&gt;
&lt;h3&gt;Custom providers via config&lt;/h3&gt;
&lt;p&gt;Adding a new coding-agent CLI doesn’t require code changes. Drop a block into the providers map with a binary name, an args template, a JSON / streaming mode, and a list of capabilities, and the router treats it like any first-class provider:&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;json&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;  &quot;providers&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;    &quot;my-custom-llm&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;      &quot;binary&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;my-llm-cli&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;      &quot;argsTemplate&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: [&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;--model&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;gpt-4&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;--prompt&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;{{prompt}}&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;      &quot;streamingMode&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;line&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;      &quot;capabilities&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: [&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;generate&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;explain&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3&gt;MCP server&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;wraptc --mcp&lt;/code&gt; runs the same router as a Model Context Protocol server. It exposes three tools: &lt;code&gt;run_coding_task&lt;/code&gt;, &lt;code&gt;get_providers&lt;/code&gt;, and &lt;code&gt;dry_run&lt;/code&gt;. Claude Desktop can ask wraptc to delegate a task on its behalf, list what’s available, or preview which provider would be picked for a given prompt without burning the request.&lt;/p&gt;
&lt;p&gt;That last one matters more than it sounds: it means Claude can reason about which subtasks are worth handing off vs. handling itself.&lt;/p&gt;
&lt;h2&gt;Quick start&lt;/h2&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;bash&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;# Install&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;brew&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; install&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; briansunter/wraptc/wraptc&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;# Use the best available provider&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;wraptc&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; ask&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; -p&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &quot;Write a TypeScript function that reverses a string&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;# Pin a specific provider&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;wraptc&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; ask&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; -p&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &quot;Explain this code&quot;&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; --provider&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; gemini&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;# Attach file context&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;wraptc&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; ask&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; -p&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &quot;Refactor this module&quot;&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; -f&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; src/utils.ts&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; -f&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; src/main.ts&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;# See what would run, without actually running it&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;wraptc&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; ask&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; -p&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &quot;Generate tests&quot;&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; --dry-run&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;# Check provider state&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;wraptc&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; providers&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h2&gt;Configuration&lt;/h2&gt;
&lt;p&gt;wraptc uses a layered config system, merged in this order:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Built-in defaults&lt;/li&gt;
&lt;li&gt;System config (&lt;code&gt;/etc/wraptc/config.json&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;User config (&lt;code&gt;~/.config/wraptc/config.json&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Project config (&lt;code&gt;./.config/wraptc/config.json&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Environment variables (&lt;code&gt;WRAPTC_*&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;CLI flags&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;So a project can override the user-level routing order without touching global state. This is useful when one repo wants &lt;code&gt;[&quot;codex&quot;, &quot;gemini&quot;]&lt;/code&gt; and another wants the opposite. Config is validated with &lt;a href=&quot;https://zod.dev/&quot;&gt;Zod&lt;/a&gt; on startup, so misconfigurations fail loud rather than silently routing to the wrong place.&lt;/p&gt;
&lt;h2&gt;Architecture&lt;/h2&gt;
&lt;p&gt;The repo is a Bun monorepo with three packages:&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;plaintext&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;packages/&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;├── core/         # Provider abstraction, router, state, config&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;├── cli/          # Commander-based wraptc command&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;└── mcp-server/   # MCP protocol server using the same core&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;packages/core&lt;/code&gt; is the interesting one. Inside it:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;providers/&lt;/code&gt;&lt;/strong&gt;: one adapter per provider, all implementing a common &lt;code&gt;Provider&lt;/code&gt; interface. Adapters handle the per-CLI quirks (flag names, JSON modes, streaming formats, error parsing).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;router.ts&lt;/code&gt;&lt;/strong&gt;: picks a provider given the request, the priority list, current state, and per-mode overrides; orchestrates fallback when a provider fails.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;state.ts&lt;/code&gt;&lt;/strong&gt;: persists per-provider request counters, daily-reset bookkeeping, error history, and cooldown windows.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;config.ts&lt;/code&gt;&lt;/strong&gt;: multi-source merge + Zod validation.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The CLI and MCP-server packages are both thin shells over core; everything that matters lives in one place.&lt;/p&gt;
&lt;h2&gt;Error model&lt;/h2&gt;
&lt;p&gt;wraptc classifies provider errors into five buckets: &lt;code&gt;OUT_OF_CREDITS&lt;/code&gt;, &lt;code&gt;RATE_LIMIT&lt;/code&gt;, &lt;code&gt;TRANSIENT&lt;/code&gt;, &lt;code&gt;BAD_REQUEST&lt;/code&gt;, and &lt;code&gt;INTERNAL&lt;/code&gt;. The router then decides whether to retry, fall back, or surface based on the class. &lt;code&gt;BAD_REQUEST&lt;/code&gt; short-circuits and returns immediately (retrying a malformed prompt is pointless); &lt;code&gt;OUT_OF_CREDITS&lt;/code&gt; puts the provider in cooldown until its reset hour and falls forward; &lt;code&gt;TRANSIENT&lt;/code&gt; triggers an in-flight fallback to the next provider in the list.&lt;/p&gt;
&lt;h2&gt;Technology stack&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;TypeScript, packaged as a Bun monorepo&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://bun.sh/&quot;&gt;Bun&lt;/a&gt; for install, build, test, and link&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/tj/commander.js&quot;&gt;Commander&lt;/a&gt; for the CLI surface&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://zod.dev/&quot;&gt;Zod&lt;/a&gt; for config schema validation&lt;/li&gt;
&lt;li&gt;The official &lt;a href=&quot;https://modelcontextprotocol.io/&quot;&gt;Model Context Protocol&lt;/a&gt; SDK for the MCP server&lt;/li&gt;
&lt;li&gt;Native binaries built per-platform for the install-without-Bun path (curl-installer, Homebrew tap, GitHub Releases)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;License&lt;/h2&gt;
&lt;p&gt;MIT&lt;/p&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>UberSearch</title><link>https://briansunter.com/projects/ubersearch</link><guid isPermaLink="true">https://briansunter.com/projects/ubersearch</guid><description>One CLI/MCP front-end for Tavily, Brave, Linkup, and self-hosted SearXNG. Tries free providers first, falls back to paid ones, tracks credits.</description><pubDate>Tue, 23 Dec 2025 21:57:08 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/ubersearch-hero.B-IbaBTW_ZYOYfH.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;UberSearch is one CLI (and one MCP server) that fronts every web-search provider I use: Tavily, Brave, Linkup, and a Docker-managed SearXNG instance. By default it queries free SearXNG first and only falls back to the paid providers when SearXNG comes back empty or errors. Credits are tracked per provider so I notice before I burn through a free tier.&lt;/p&gt;
&lt;h2&gt;How It Works&lt;/h2&gt;
&lt;figure&gt;&lt;img alt=&quot;UberSearch provider routing architecture diagram&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1536px) 1536px, 100vw&quot; width=&quot;1536&quot; height=&quot;1024&quot; src=&quot;https://briansunter.com/_astro/ubersearch-explainer.DNaEecKk_Z1EjeOS.webp&quot; srcset=&quot;https://briansunter.com/_astro/ubersearch-explainer.DNaEecKk_Z103pdV.webp 640w, https://briansunter.com/_astro/ubersearch-explainer.DNaEecKk_1wAMOO.webp 750w, https://briansunter.com/_astro/ubersearch-explainer.DNaEecKk_Z2bSHDp.webp 828w, https://briansunter.com/_astro/ubersearch-explainer.DNaEecKk_2lHzTe.webp 1080w, https://briansunter.com/_astro/ubersearch-explainer.DNaEecKk_ih9fg.webp 1280w, https://briansunter.com/_astro/ubersearch-explainer.DNaEecKk_Z1EjeOS.webp 1536w&quot; /&gt;&lt;figcaption&gt;UberSearch provider routing architecture diagram&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The orchestrator runs a first-success strategy by default: SearXNG (auto-started via Docker), then Tavily, Brave, Linkup. There’s also an &lt;code&gt;all&lt;/code&gt; strategy that fans out across every provider in parallel and merges the result sets. Credit usage is logged per engine.&lt;/p&gt;
&lt;h2&gt;Features&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Multiple providers: Tavily, Brave, Linkup, SearXNG (Docker-auto-started)&lt;/li&gt;
&lt;li&gt;Plug-in custom providers via TypeScript&lt;/li&gt;
&lt;li&gt;Strategies: &lt;code&gt;all&lt;/code&gt; (merge every provider) or &lt;code&gt;first-success&lt;/code&gt; (cheapest path)&lt;/li&gt;
&lt;li&gt;Per-engine credit tracking with low-credit warnings&lt;/li&gt;
&lt;li&gt;MCP server for using it from Claude Desktop&lt;/li&gt;
&lt;li&gt;JSON or TypeScript config (&lt;code&gt;defineConfig&lt;/code&gt;), XDG-aware paths&lt;/li&gt;
&lt;li&gt;Optional Docker integration for the SearXNG instance&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Technology Stack&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;TypeScript on Bun&lt;/li&gt;
&lt;li&gt;Docker (optional) for SearXNG&lt;/li&gt;
&lt;li&gt;Model Context Protocol&lt;/li&gt;
&lt;/ul&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Yuptime</title><link>https://briansunter.com/projects/yuptime</link><guid isPermaLink="true">https://briansunter.com/projects/yuptime</guid><description>A Kubernetes-native uptime monitor. Monitors are CRDs, state lives on the CRD&apos;s status subresource, and each check runs in its own throw-away Job pod.</description><pubDate>Tue, 16 Dec 2025 08:57:22 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/yuptime-hero.DIfs4PH4_Z1JQMAf.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;Yuptime is an uptime-monitoring controller where every monitor is a Kubernetes CRD. There’s no database; state lives on each CRD’s status subresource, and every check runs as its own short-lived Job pod, so a misbehaving probe can’t take down the controller. That makes the whole thing GitOps-native: declare your monitors as YAML in a repo, sync with Flux or Argo CD, done.&lt;/p&gt;
&lt;h2&gt;Features&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;All configuration is YAML in Git; works cleanly with Flux, Argo CD, or any GitOps flow&lt;/li&gt;
&lt;li&gt;No database: state lives on CRD status subresources&lt;/li&gt;
&lt;li&gt;Each check runs in an isolated Kubernetes Job pod&lt;/li&gt;
&lt;li&gt;Prometheus metrics for monitoring and alerting&lt;/li&gt;
&lt;li&gt;Native Alertmanager integration&lt;/li&gt;
&lt;li&gt;Maintenance-window CRDs suppress alerts during planned work&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Monitor Types&lt;/h2&gt;
&lt;h3&gt;Network&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;HTTP: check status code and response body&lt;/li&gt;
&lt;li&gt;TCP: port reachability&lt;/li&gt;
&lt;li&gt;DNS: resolve and validate records&lt;/li&gt;
&lt;li&gt;Ping: ICMP reachability&lt;/li&gt;
&lt;li&gt;WebSocket: connect and exchange a frame&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Application&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Push: heartbeat endpoint for cron jobs and batch processes&lt;/li&gt;
&lt;li&gt;Steam: game-server availability&lt;/li&gt;
&lt;li&gt;Kubernetes: pod and service health inside the cluster&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Architecture&lt;/h2&gt;
&lt;p&gt;Standard Kubernetes operator pattern:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Reconcilers for &lt;code&gt;Monitor&lt;/code&gt;, &lt;code&gt;MonitorSet&lt;/code&gt;, and &lt;code&gt;MaintenanceWindow&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;A job manager that schedules and runs checks&lt;/li&gt;
&lt;li&gt;A validation layer that rejects malformed CRDs before they hit the reconciler&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Configuration&lt;/h2&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;yaml&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;apiVersion&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;yuptime.io/v1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;kind&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;Monitor&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;metadata&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;  name&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;api-health&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;spec&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;  type&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;http&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;  enabled&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;  schedule&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;    intervalSeconds&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;60&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;    timeoutSeconds&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;30&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;  target&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;    http&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;      url&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;https://api.example.com/health&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h2&gt;Technology Stack&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;TypeScript on Bun&lt;/li&gt;
&lt;li&gt;Kubernetes client for CRD management&lt;/li&gt;
&lt;li&gt;Custom reconciler framework&lt;/li&gt;
&lt;li&gt;CloudWatch integration for metrics export&lt;/li&gt;
&lt;/ul&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>swipefeed</title><link>https://briansunter.com/projects/swipefeed</link><guid isPermaLink="true">https://briansunter.com/projects/swipefeed</guid><description>Headless React primitives for building TikTok and Reels-style swipe feeds: a render-prop component and hook with virtualization, gestures, keyboard, and accessibility built in.</description><pubDate>Mon, 08 Dec 2025 04:52:27 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/swipefeed-hero.BiMCDSP3_Z1updLL.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;swipefeed is a headless React library for vertical or horizontal swipe feeds (the TikTok / Reels / Stories interaction pattern). It ships a render-prop component (&lt;code&gt;SwipeDeck&lt;/code&gt;) and a hook (&lt;code&gt;useSwipeDeck&lt;/code&gt;) that wire up native CSS scroll-snap, TanStack virtualization, pointer/wheel/keyboard input, accessibility, and programmatic controls. You bring the markup and styles; swipefeed handles the behavior.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Swipefeed input and rendering architecture diagram&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1536px) 1536px, 100vw&quot; width=&quot;1536&quot; height=&quot;1024&quot; src=&quot;https://briansunter.com/_astro/swipefeed-explainer.BbK9vILq_2oMv2D.webp&quot; srcset=&quot;https://briansunter.com/_astro/swipefeed-explainer.BbK9vILq_1TNqHz.webp 640w, https://briansunter.com/_astro/swipefeed-explainer.BbK9vILq_Z1nkPso.webp 750w, https://briansunter.com/_astro/swipefeed-explainer.BbK9vILq_ZJ8FhR.webp 828w, https://briansunter.com/_astro/swipefeed-explainer.BbK9vILq_2mlbbP.webp 1080w, https://briansunter.com/_astro/swipefeed-explainer.BbK9vILq_1nf7nU.webp 1280w, https://briansunter.com/_astro/swipefeed-explainer.BbK9vILq_2oMv2D.webp 1536w&quot; /&gt;&lt;figcaption&gt;Swipefeed input and rendering architecture diagram&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2&gt;Features&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Headless&lt;/strong&gt;: Bring your own markup and styles; spread the supplied props for behavior&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Vertical or Horizontal&lt;/strong&gt;: LTR and RTL aware for horizontal feeds&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Virtualized&lt;/strong&gt;: Backed by &lt;code&gt;@tanstack/react-virtual&lt;/code&gt; with auto-measured viewport size and tunable overscan&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Multi-Input&lt;/strong&gt;: Pointer drag/flick, discrete wheel paging with heavy dampening, keyboard (global or scoped)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Controlled or Uncontrolled&lt;/strong&gt;: Optional controlled &lt;code&gt;index&lt;/code&gt;, loopable navigation, and programmatic &lt;code&gt;prev / next / scrollTo&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Accessibility-First&lt;/strong&gt;: Focusable &lt;code&gt;role=&quot;feed&quot;&lt;/code&gt; viewport, per-item &lt;code&gt;role=&quot;article&quot;&lt;/code&gt;, &lt;code&gt;aria-label&lt;/code&gt;, &lt;code&gt;aria-busy&lt;/code&gt;, snap alignment&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Reduced-Motion Aware&lt;/strong&gt;: &lt;code&gt;prefers-reduced-motion&lt;/code&gt; triggers instant scrolling&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Infinite Loading Hook&lt;/strong&gt;: &lt;code&gt;onEndReached&lt;/code&gt; fires near both ends with distance and direction&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Quick Start&lt;/h2&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;tsx&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; { SwipeDeck } &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &quot;swipefeed&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; Feed&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;({ &lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;items&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; }) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;  return&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    &amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;SwipeDeck&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; items&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;{items} &lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;className&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;w-full h-screen overflow-hidden&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;      {({ &lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;item&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;isActive&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;props&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; }) &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;        &amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;section&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;...&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;props} &lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;style&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;{{ height: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;100vh&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; }}&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;          &amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;VideoPlayer&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; video&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;{item} &lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;playing&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;{isActive} /&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;        &amp;lt;/&lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;section&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;      )}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    &amp;lt;/&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;SwipeDeck&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  );&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;For full control over markup and layout, drop down to the hook:&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;tsx&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; deck&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; useSwipeDeck&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;({ items, orientation: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;horizontal&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, direction: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;rtl&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; });&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; viewportProps&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; deck.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;getViewportProps&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;();&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h2&gt;Input Handling&lt;/h2&gt;
&lt;p&gt;Pointer gestures use threshold + flick-velocity detection with axis locking. Wheel input is discretized with debounce, cooldown, and delta caps to stop trackpads from jumping multiple items at once. Keyboard bindings (arrows, Home/End, PageUp/PageDown) can be scoped to the viewport or registered globally, and flip horizontal intent in RTL. Programmatic &lt;code&gt;scrollTo&lt;/code&gt; honors &lt;code&gt;prefers-reduced-motion&lt;/code&gt; and temporarily disables snap while animating to avoid fighting CSS snap.&lt;/p&gt;
&lt;h2&gt;Technology Stack&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;TypeScript and React 19&lt;/li&gt;
&lt;li&gt;&lt;code&gt;@tanstack/react-virtual&lt;/code&gt; for virtualization&lt;/li&gt;
&lt;li&gt;Bun for development, build, and tests&lt;/li&gt;
&lt;li&gt;Vitest (jsdom + browser runners) with 99% coverage&lt;/li&gt;
&lt;li&gt;TypeDoc for API docs, Storybook for component stories, GitHub Pages for the demo&lt;/li&gt;
&lt;/ul&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Gitforest</title><link>https://briansunter.com/projects/gitforest</link><guid isPermaLink="true">https://briansunter.com/projects/gitforest</guid><description>A terminal UI for managing dozens of Git repositories at once: status dashboard, batch git operations, GitHub integration, and background fetches.</description><pubDate>Tue, 02 Dec 2025 10:38:15 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/gitforest-hero.CHDUP7Me_Z1u8izc.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;Gitforest is a terminal UI for managing many Git repositories at once. It scans configured directories for git repos, non-git projects, and submodules; surfaces uncommitted changes and unpushed/unpulled commits at a glance; and lets me run pull, push, fetch, or &lt;code&gt;gh&lt;/code&gt;-driven GitHub operations across one repo or a whole selection without leaving the terminal.&lt;/p&gt;
&lt;p&gt;I built it because I work across a &lt;code&gt;~/projects&lt;/code&gt; folder with dozens of repos plus a dotfiles tree of submodules, and “is everything pushed?” was a question I kept answering by &lt;code&gt;cd&lt;/code&gt;-ing through directories. Gitforest answers it on one screen.&lt;/p&gt;
&lt;h2&gt;Features&lt;/h2&gt;
&lt;h3&gt;Project discovery&lt;/h3&gt;
&lt;p&gt;Configured directories are scanned with bounded depth and a concurrency limit. Gitforest recognizes git repos via &lt;code&gt;.git&lt;/code&gt;, submodules via &lt;code&gt;.gitmodules&lt;/code&gt;, and non-git projects via marker files (&lt;code&gt;package.json&lt;/code&gt;, &lt;code&gt;Cargo.toml&lt;/code&gt;, &lt;code&gt;pyproject.toml&lt;/code&gt;, &lt;code&gt;go.mod&lt;/code&gt;, &lt;code&gt;Gemfile&lt;/code&gt;, &lt;code&gt;pom.xml&lt;/code&gt;, &lt;code&gt;build.gradle&lt;/code&gt;, and others) so I can spot folders that should probably be repos but aren’t yet.&lt;/p&gt;
&lt;h3&gt;Status dashboard&lt;/h3&gt;
&lt;p&gt;For every git repo, the list shows:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Clean / dirty working tree&lt;/li&gt;
&lt;li&gt;Number of unpushed and unpulled commits relative to the upstream&lt;/li&gt;
&lt;li&gt;Submodule indicator&lt;/li&gt;
&lt;li&gt;Last activity timestamp for sorting&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Sort by name, status, or last activity; filter with &lt;code&gt;/&lt;/code&gt; and a free-text query.&lt;/p&gt;
&lt;h3&gt;Batch git operations&lt;/h3&gt;
&lt;p&gt;Multi-select with &lt;code&gt;space&lt;/code&gt; (or &lt;code&gt;a&lt;/code&gt; to select all), then run an operation across the whole selection:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;p&lt;/code&gt; push, &lt;code&gt;P&lt;/code&gt; pull, &lt;code&gt;f&lt;/code&gt; fetch&lt;/li&gt;
&lt;li&gt;&lt;code&gt;i&lt;/code&gt; initialize git in selected non-git projects&lt;/li&gt;
&lt;li&gt;&lt;code&gt;c&lt;/code&gt; create a GitHub repo for selected directories (default visibility configurable)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;A&lt;/code&gt; archive a GitHub repo&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Push and pull are parallelized with backpressure; results stream back into the dashboard as they finish.&lt;/p&gt;
&lt;h3&gt;Background sync&lt;/h3&gt;
&lt;p&gt;A worker fetches remotes every five minutes so the unpushed/unpulled counters stay roughly current without me hammering &lt;code&gt;f&lt;/code&gt; myself.&lt;/p&gt;
&lt;h3&gt;Caching&lt;/h3&gt;
&lt;p&gt;A local SQLite database (via Drizzle) caches the last scan result, so subsequent runs render instantly and only re-stat the directories that changed.&lt;/p&gt;
&lt;h2&gt;Configuration&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;~/.config/gitforest/config.yaml&lt;/code&gt; controls which directories to scan and how:&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;yaml&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;directories&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  - &lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;path&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;~/projects&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;    maxDepth&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;2&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;    label&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;Projects&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  - &lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;path&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;~/.dotfiles&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;    maxDepth&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;3&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;    label&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;Dotfiles&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;scan&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;  ignore&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: [&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;node_modules&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;.git&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;vendor&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;  concurrency&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;5&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;github&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;  defaultVisibility&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;private&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;display&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;  sortBy&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;status&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;  sortDirection&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;desc&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;gitforest --init&lt;/code&gt; writes a starter file the first time.&lt;/p&gt;
&lt;h2&gt;Quick start&lt;/h2&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;bash&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;# Run without installing&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;bunx&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; gitforest&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; --init&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;bunx&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; gitforest&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;# Or install globally&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;bun&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; add&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; -g&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; gitforest&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;gitforest&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h2&gt;Technology stack&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;TypeScript on the Bun runtime, distributed on npm as &lt;code&gt;gitforest&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/vadimdemedes/ink&quot;&gt;Ink&lt;/a&gt; for the terminal UI. React is rendered into a TTY&lt;/li&gt;
&lt;li&gt;&lt;code&gt;@inkjs/ui&lt;/code&gt; and &lt;code&gt;ink-select-input&lt;/code&gt; for higher-level components&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Bun.$&lt;/code&gt; for git shell operations, the &lt;code&gt;gh&lt;/code&gt; CLI for GitHub operations&lt;/li&gt;
&lt;li&gt;Drizzle ORM over SQLite for the scan cache&lt;/li&gt;
&lt;li&gt;Zod for config validation, YAML for the config file format&lt;/li&gt;
&lt;/ul&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Verso</title><link>https://briansunter.com/projects/verso</link><guid isPermaLink="true">https://briansunter.com/projects/verso</guid><description>A high-performance vector database for Bun, Node.js, and the browser. HNSW indexing, Int8 quantization, and pluggable storage backends.</description><pubDate>Thu, 27 Nov 2025 08:37:18 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/verso-hero.IWyACpqL_ZNKTQr.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;Verso is an embeddable vector database written in TypeScript. It runs the same HNSW index in Bun, Node.js, and the browser, persists to the local file system or the Origin Private File System depending on where it is loaded, and ships with Int8 quantization, metadata filtering, and a small library of pre-tuned parameter presets.&lt;/p&gt;
&lt;p&gt;I built it because most ANN libraries assume a server. I wanted something I could drop into a Bun script, a desktop app, or a static web page and have it index a few hundred thousand vectors locally without spinning up a separate service.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Verso vector index architecture diagram&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1536px) 1536px, 100vw&quot; width=&quot;1536&quot; height=&quot;1024&quot; src=&quot;https://briansunter.com/_astro/verso-explainer.CPCq7YxQ_ZcGx5T.webp&quot; srcset=&quot;https://briansunter.com/_astro/verso-explainer.CPCq7YxQ_4F2L8.webp 640w, https://briansunter.com/_astro/verso-explainer.CPCq7YxQ_Z1dvVXF.webp 750w, https://briansunter.com/_astro/verso-explainer.CPCq7YxQ_1bIFdz.webp 828w, https://briansunter.com/_astro/verso-explainer.CPCq7YxQ_1dESva.webp 1080w, https://briansunter.com/_astro/verso-explainer.CPCq7YxQ_Z1mGvu6.webp 1280w, https://briansunter.com/_astro/verso-explainer.CPCq7YxQ_ZcGx5T.webp 1536w&quot; /&gt;&lt;figcaption&gt;Verso vector index architecture diagram&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2&gt;Features&lt;/h2&gt;
&lt;h3&gt;HNSW index&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Hierarchical Navigable Small World graph for approximate nearest neighbor search&lt;/li&gt;
&lt;li&gt;Cosine, Euclidean, and dot product distance metrics&lt;/li&gt;
&lt;li&gt;Build-time (&lt;code&gt;M&lt;/code&gt;, &lt;code&gt;efConstruction&lt;/code&gt;) and query-time (&lt;code&gt;efSearch&lt;/code&gt;) tuning&lt;/li&gt;
&lt;li&gt;Tuned presets target 95-99%+ Recall@10 depending on data and &lt;code&gt;efSearch&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Sub-millisecond to low-millisecond queries in the bundled benchmarks&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Int8 quantization&lt;/h3&gt;
&lt;p&gt;A &lt;code&gt;ScalarQuantizer&lt;/code&gt; trains on a sample of vectors and produces an Int8 representation that uses 4x less memory than the original Float32 vectors, with minimal recall loss. A &lt;code&gt;QuantizedVectorStore&lt;/code&gt; keeps the compact form in memory for environments where every byte matters.&lt;/p&gt;
&lt;h3&gt;Multi-platform storage&lt;/h3&gt;
&lt;p&gt;Verso picks the right backend automatically:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Bun / Node.js&lt;/strong&gt;: file system via &lt;code&gt;BunStorageBackend&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Browser&lt;/strong&gt;: Origin Private File System via &lt;code&gt;OPFSBackend&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Fallback&lt;/strong&gt;: in-memory &lt;code&gt;MemoryBackend&lt;/code&gt; when persistence is not available&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The same collection API works across all three, so a snippet that builds an index in a Bun script can run unchanged inside a web worker.&lt;/p&gt;
&lt;h3&gt;Metadata filtering&lt;/h3&gt;
&lt;p&gt;Each vector can carry an arbitrary metadata object, and queries accept a MongoDB-style filter that runs alongside the ANN search:&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;ts&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; results&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; await&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; collection.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;query&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;({&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  queryVector: queryVec,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  k: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;10&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  filter: {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    category: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;tech&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    score: { $gt: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;0.5&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    tags: { $in: [&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;ai&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;ml&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;] }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;});&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Supported operators: &lt;code&gt;$eq&lt;/code&gt;, &lt;code&gt;$ne&lt;/code&gt;, &lt;code&gt;$gt&lt;/code&gt;, &lt;code&gt;$gte&lt;/code&gt;, &lt;code&gt;$lt&lt;/code&gt;, &lt;code&gt;$lte&lt;/code&gt;, &lt;code&gt;$in&lt;/code&gt;, &lt;code&gt;$nin&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;Parameter presets&lt;/h3&gt;
&lt;p&gt;A small set of named presets covers the common cases without forcing users to learn HNSW tuning:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;By dimension: &lt;code&gt;low-dim&lt;/code&gt;, &lt;code&gt;medium-dim&lt;/code&gt;, &lt;code&gt;high-dim&lt;/code&gt;, &lt;code&gt;very-high-dim&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;By dataset size: &lt;code&gt;small-dataset&lt;/code&gt;, &lt;code&gt;large-dataset&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;By goal: &lt;code&gt;max-recall&lt;/code&gt;, &lt;code&gt;low-latency&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;By embedding model: &lt;code&gt;getRAGPreset(&apos;text-embedding-3-large&apos;)&lt;/code&gt; and friends&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;getRecommendedPreset(dimension)&lt;/code&gt; picks a sensible default automatically.&lt;/p&gt;
&lt;h3&gt;Batch and upsert&lt;/h3&gt;
&lt;p&gt;Single-vector add, batch add, upsert (update existing or insert new), single and batch delete, batch query, and a &lt;code&gt;compact()&lt;/code&gt; operation that permanently reclaims space from soft-deleted vectors.&lt;/p&gt;
&lt;h2&gt;Quick start&lt;/h2&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;ts&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; { VectorDB } &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &apos;verso-db&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; db&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; new&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; VectorDB&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;({ storagePath: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;./my_vectors&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; });&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; collection&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; await&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; db.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;createCollection&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;docs&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, { dimension: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;3&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; });&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;await&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; collection.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;add&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;({&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  ids: [&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;a&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;b&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;c&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  vectors: [&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;    new&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; Float32Array&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;([&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;]),&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;    new&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; Float32Array&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;([&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;]),&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;    new&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; Float32Array&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;([&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;])&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  ]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;});&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; results&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; await&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; collection.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;query&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;({&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  queryVector: &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; Float32Array&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;([&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;0.1&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;]),&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  k: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;2&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;});&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;console.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;log&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(results.ids); &lt;/span&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;// [&apos;a&apos;, &apos;b&apos;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;await&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; db.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;close&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;();&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h2&gt;Technology stack&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;TypeScript, distributed on npm as &lt;code&gt;verso-db&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;HNSW implementation written from scratch&lt;/li&gt;
&lt;li&gt;Bun and Node.js runtime support, plus a browser build using OPFS&lt;/li&gt;
&lt;li&gt;Vitest for unit tests, plus a separate browser test suite&lt;/li&gt;
&lt;li&gt;Recall, storage, and end-to-end benchmark suites against the Cohere Wikipedia dataset&lt;/li&gt;
&lt;/ul&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Quantum Engine</title><link>https://briansunter.com/projects/quantum-engine</link><guid isPermaLink="true">https://briansunter.com/projects/quantum-engine</guid><description>A minimal, modular Entity Component System (ECS) game engine in TypeScript. Browser-first, plugin-driven, and tuned for WebGL, Canvas, and modern web APIs.</description><pubDate>Sun, 02 Nov 2025 09:01:40 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/quantum-engine-hero.P-7zhtMf_Z2iWued.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;Quantum Engine is a TypeScript Entity Component System designed for the browser. It is a Bun monorepo of 20 packages: a tiny ECS core plus optional plugins for rendering, physics, input, audio, animation, networking, UI, and scene editing, all wired together by a fluent &lt;code&gt;App&lt;/code&gt; runtime with a schedule-based system executor and an event bus.&lt;/p&gt;
&lt;p&gt;The goal was a Bevy-style architecture that runs natively on the web. Every package targets the browser (WebGL, Canvas, &lt;code&gt;requestAnimationFrame&lt;/code&gt;), state lives in cache-friendly Structure-of-Arrays component storage, and the same plugin pattern that registers core systems also powers the Three.js renderer, the Rapier3D physics layer, and the scene editor.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Quantum Engine architecture diagram&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1536px) 1536px, 100vw&quot; width=&quot;1536&quot; height=&quot;1024&quot; src=&quot;https://briansunter.com/_astro/quantum-engine-diagram.KSZX0qMD_2es1eG.webp&quot; srcset=&quot;https://briansunter.com/_astro/quantum-engine-diagram.KSZX0qMD_2iVv6Q.webp 640w, https://briansunter.com/_astro/quantum-engine-diagram.KSZX0qMD_ZUf8Na.webp 750w, https://briansunter.com/_astro/quantum-engine-diagram.KSZX0qMD_Y9rix.webp 828w, https://briansunter.com/_astro/quantum-engine-diagram.KSZX0qMD_Z1LdQ3v.webp 1080w, https://briansunter.com/_astro/quantum-engine-diagram.KSZX0qMD_1zNpJX.webp 1280w, https://briansunter.com/_astro/quantum-engine-diagram.KSZX0qMD_2es1eG.webp 1536w&quot; /&gt;&lt;figcaption&gt;Quantum Engine architecture diagram&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2&gt;Features&lt;/h2&gt;
&lt;h3&gt;ECS core&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Type-safe components with both Structure of Arrays (SoA) and Array of Structures (AoS) storage&lt;/li&gt;
&lt;li&gt;Archetype-based queries with caching, BitSet component checks, and topological system ordering&lt;/li&gt;
&lt;li&gt;Entity lifecycle with ID reuse and component lifecycle hooks&lt;/li&gt;
&lt;li&gt;Resource manager for typed global state and an event bus for loose coupling between systems&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Plugin architecture&lt;/h3&gt;
&lt;p&gt;Everything outside the core is a plugin. A plugin declares its dependencies, components, systems, and resources, and gets &lt;code&gt;build&lt;/code&gt;, &lt;code&gt;startup&lt;/code&gt;, and &lt;code&gt;shutdown&lt;/code&gt; hooks. Plugins are hot-swappable, dependency-ordered, and composed through a fluent builder.&lt;/p&gt;
&lt;h3&gt;Convenience presets&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;@quantum/presets&lt;/code&gt; ships preset bundles so a typical app is one line:&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;ts&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; { createWebApp } &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &apos;@quantum/presets&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; { &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;app&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;canvas&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; } &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; createWebApp&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;()&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;app.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;addSystem&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(ScheduleLabel.Update, &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; MovementSystem&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;())&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;app.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;run&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;()&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Presets cover the common cases: &lt;code&gt;core&lt;/code&gt; (server / headless), &lt;code&gt;web&lt;/code&gt; (2D canvas + input), &lt;code&gt;render&lt;/code&gt; (Three.js), &lt;code&gt;game&lt;/code&gt; (render + physics + animation + assets), and &lt;code&gt;full&lt;/code&gt; (everything).&lt;/p&gt;
&lt;h3&gt;Rendering, physics, and assets&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;@quantum/render&lt;/code&gt;: Three.js integration with scene, camera, and renderer wired to the ECS&lt;/li&gt;
&lt;li&gt;&lt;code&gt;@quantum/physics&lt;/code&gt;: Rapier3D bindings, exposed as components and systems&lt;/li&gt;
&lt;li&gt;&lt;code&gt;@quantum/asset&lt;/code&gt;: async asset loading with cache and lifecycle integration&lt;/li&gt;
&lt;li&gt;&lt;code&gt;@quantum/animation&lt;/code&gt;, &lt;code&gt;@quantum/audio&lt;/code&gt;, &lt;code&gt;@quantum/spatial&lt;/code&gt;, &lt;code&gt;@quantum/networking&lt;/code&gt;, &lt;code&gt;@quantum/ui&lt;/code&gt;: additional plugins for the rest of a typical game stack&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Scene editor&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;@quantum/editor&lt;/code&gt; adds picking, gizmos, and camera controls, and pairs with &lt;code&gt;@quantum/scene&lt;/code&gt; for serialization, prefabs, and a scene builder API. The editor is itself an ECS app; it registers systems and resources just like any other plugin.&lt;/p&gt;
&lt;h3&gt;Tooling&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Bun workspace with Turborepo for parallel builds and dependency-aware watching&lt;/li&gt;
&lt;li&gt;Vitest for unit tests, Playwright for browser/component tests, mitata for benchmarks&lt;/li&gt;
&lt;li&gt;TypeDoc + an Astro/Starlight docs site under &lt;code&gt;apps/site&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Per-package builds target the browser with external workspace deps and tree-shakeable ESM output&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Architecture&lt;/h2&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;plaintext&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;App&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  ├── World          // entity + component storage and queries&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  ├── ResourceManager // typed global state&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  ├── Schedule       // Startup → PreUpdate → Update → PostUpdate → Render&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  └── EventBus       // typed events between systems&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Plugins layer on top: Time, Transform, Web, Input, Render, Physics, Asset,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Animation, Audio, UI, Spatial, Networking, Editor, Scene, Debug, ...&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;A typical frame walks the schedule once: time advances, input is sampled, gameplay systems run in &lt;code&gt;Update&lt;/code&gt;, transforms and physics resolve in &lt;code&gt;PostUpdate&lt;/code&gt;, and the renderer flushes in &lt;code&gt;Render&lt;/code&gt;.&lt;/p&gt;
&lt;h2&gt;Quick start&lt;/h2&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;ts&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; { createWebApp } &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &apos;@quantum/presets&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; { defineComponent, createQuery, ScheduleLabel, System } &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &apos;@quantum/core&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; Position&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; defineComponent&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;({ x: Float32Array, y: Float32Array }, { name: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;Position&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; })&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; Velocity&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; defineComponent&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;({ x: Float32Array, y: Float32Array }, { name: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;Velocity&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; })&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; Movement&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; extends&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; System&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;  update&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;world&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;    const&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; q&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; createQuery&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;().&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;with&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(Position).&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;with&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(Velocity).&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;build&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;()&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    q.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;executeWithCallback&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(world, (&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;_e&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;p&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;v&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;      p.x &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;+=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; v.x&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;      p.y &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;+=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; v.y&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    })&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; { &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;app&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; } &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; createWebApp&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;()&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;app.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;addSystem&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(ScheduleLabel.Update, &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; Movement&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;())&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;app.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;run&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;()&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h2&gt;Technology stack&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;TypeScript across a Bun monorepo of 20 &lt;code&gt;@quantum/*&lt;/code&gt; packages plus tutorial and example apps&lt;/li&gt;
&lt;li&gt;Browser-first build pipeline (ESM, external workspace deps, code splitting, source maps)&lt;/li&gt;
&lt;li&gt;Three.js for 3D rendering, Rapier3D for physics, native Web APIs for input, audio, and timing&lt;/li&gt;
&lt;li&gt;Turborepo for build orchestration; Vitest, Playwright, and mitata for tests and benchmarks&lt;/li&gt;
&lt;li&gt;Astro + Starlight documentation site backed by TypeDoc-generated API references&lt;/li&gt;
&lt;/ul&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Vannevar</title><link>https://briansunter.com/projects/vannevar</link><guid isPermaLink="true">https://briansunter.com/projects/vannevar</guid><description>Local RAG search for markdown files. SQLite FTS5 keyword search and HNSW vector search fused with Reciprocal Rank Fusion, running fully offline on a local ONNX embedding model.</description><pubDate>Thu, 30 Oct 2025 08:48:25 GMT</pubDate><content:encoded>&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;Vannevar is a local RAG search tool for markdown files. It builds a hybrid index over a directory of notes: BM25 keyword search via SQLite FTS5 and semantic vector search via an HNSW graph. It fuses the two ranked lists with Reciprocal Rank Fusion to return better results than either approach alone.&lt;/p&gt;
&lt;p&gt;Everything runs offline. The embedding model (&lt;a href=&quot;https://huggingface.co/nomic-ai/nomic-embed-text-v1.5&quot;&gt;nomic-embed-text-v1.5&lt;/a&gt;, q4f16 quantized) downloads once and runs locally via ONNX, the vector index lives on disk, and queries hit a local SQLite database.&lt;/p&gt;
&lt;p&gt;It is named after &lt;a href=&quot;https://en.wikipedia.org/wiki/Vannevar_Bush&quot;&gt;Vannevar Bush&lt;/a&gt;, who envisioned the &lt;a href=&quot;https://en.wikipedia.org/wiki/Memex&quot;&gt;Memex&lt;/a&gt;, a device for storing, linking, and retrieving personal knowledge.&lt;/p&gt;
&lt;h2&gt;Features&lt;/h2&gt;
&lt;h3&gt;Hybrid search&lt;/h3&gt;
&lt;p&gt;FTS5 ranks chunks by BM25 keyword relevance. The vector store embeds the query with the same model used at index time and finds nearest neighbors via HNSW cosine similarity. RRF merges the two ranked lists with &lt;code&gt;score = weight / (k + rank)&lt;/code&gt; at k=60, deduplicating chunks that appear in both, and normalizes so the top result is 1.0.&lt;/p&gt;
&lt;p&gt;The CLI also exposes the underlying searches directly: &lt;code&gt;search&lt;/code&gt; for BM25 only and &lt;code&gt;vsearch&lt;/code&gt; for vector only, so you can fall back to whichever side fits the query.&lt;/p&gt;
&lt;h3&gt;Markdown-aware chunking&lt;/h3&gt;
&lt;p&gt;The chunker respects heading hierarchy, keeps fenced code blocks and tables atomic, and applies configurable overlap between chunks so an answer that straddles a chunk boundary still surfaces.&lt;/p&gt;
&lt;h3&gt;Fully local&lt;/h3&gt;
&lt;p&gt;No API keys, no cloud calls. The embedding model is ~111MB and downloads on first use; after that, everything (embedding, indexing, search) runs on the local machine.&lt;/p&gt;
&lt;h3&gt;Root-aware indexes&lt;/h3&gt;
&lt;p&gt;Directory indexes store each document as &lt;code&gt;root path + relative path&lt;/code&gt;, so a single database can hold multiple indexed directories with overlapping filenames. &lt;code&gt;get&lt;/code&gt; accepts a unique relative path, an absolute path, or a &lt;code&gt;#&lt;/code&gt; document/chunk ID prefix.&lt;/p&gt;
&lt;h3&gt;Fast&lt;/h3&gt;
&lt;p&gt;FTS queries land in the ~0.1ms range, vector search in ~14ms, and the fused hybrid query in ~11ms on the bundled benchmarks.&lt;/p&gt;
&lt;h2&gt;Quick start&lt;/h2&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;bash&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;# Index a directory of markdown files&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;bun&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; src/cli.ts&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; index&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; ./docs&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;# Hybrid search (default)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;bun&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; src/cli.ts&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; query&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &quot;how to configure authentication&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;# Keyword search only (BM25)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;bun&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; src/cli.ts&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; search&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &quot;authentication config&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;# Vector search only&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;bun&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; src/cli.ts&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; vsearch&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &quot;setting up user login&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;# Retrieve a chunk or document&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;bun&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; src/cli.ts&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; get&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; setup.md&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;bun&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; src/cli.ts&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; get&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &apos;#&amp;lt;chunk-or-document-id-prefix&amp;gt;&apos;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Output flags cover &lt;code&gt;--json&lt;/code&gt;, &lt;code&gt;--md&lt;/code&gt;, &lt;code&gt;--csv&lt;/code&gt;, &lt;code&gt;--xml&lt;/code&gt;, and &lt;code&gt;--files&lt;/code&gt; for compact file references.&lt;/p&gt;
&lt;h2&gt;Architecture&lt;/h2&gt;
&lt;p&gt;Indexing runs in two phases with pipelining: read and chunk first, then embed and store. The store is SQLite via &lt;code&gt;bun:sqlite&lt;/code&gt; and Drizzle ORM, with an FTS5 virtual table for keyword search. The vector side wraps &lt;a href=&quot;https://github.com/briansunter/verso&quot;&gt;verso-db&lt;/a&gt; for the HNSW index, so the same vector store I use elsewhere drives the semantic half of the search.&lt;/p&gt;
&lt;h2&gt;Technology stack&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;TypeScript on the &lt;a href=&quot;https://bun.sh&quot;&gt;Bun&lt;/a&gt; runtime, using &lt;code&gt;bun:sqlite&lt;/code&gt;, &lt;code&gt;Bun.file&lt;/code&gt;, and &lt;code&gt;Bun.CryptoHasher&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;SQLite with &lt;a href=&quot;https://orm.drizzle.team&quot;&gt;Drizzle ORM&lt;/a&gt; for storage, FTS5 with porter stemming for keyword search&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/briansunter/verso&quot;&gt;verso-db&lt;/a&gt; HNSW index for vector search&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://huggingface.co/nomic-ai/nomic-embed-text-v1.5&quot;&gt;nomic-embed-text-v1.5&lt;/a&gt; embeddings via &lt;a href=&quot;https://github.com/huggingface/transformers.js&quot;&gt;@huggingface/transformers&lt;/a&gt; (ONNX, q4f16 quantized)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://biomejs.dev&quot;&gt;Biome&lt;/a&gt; for linting&lt;/li&gt;
&lt;/ul&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Vibe Cafe</title><link>https://briansunter.com/projects/lofi</link><guid isPermaLink="true">https://briansunter.com/projects/lofi</guid><description>A lofi coding room with ambient beats, streaming terminal diffs, Codex and Claude-style themes, and keyboard-friendly controls.</description><pubDate>Fri, 10 Oct 2025 06:53:03 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/lofi-hero.Zs2fbQxc_Z1qIoEL.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;Vibe Cafe is a lofi coding companion: a dark terminal-inspired page that streams fake-but-familiar diffs while lofi tracks play in the background. It is meant to feel like a late-night coding session you can leave open while you work.&lt;/p&gt;
&lt;h2&gt;Features&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Continuous terminal diff stream with animated thinking states&lt;/li&gt;
&lt;li&gt;Codex and Claude Code terminal themes&lt;/li&gt;
&lt;li&gt;Lofi audio player with track navigation and playback speed controls&lt;/li&gt;
&lt;li&gt;Fullscreen terminal mode for a focused ambient display&lt;/li&gt;
&lt;li&gt;Keyboard shortcuts for play/pause, theme switching, fullscreen, and track navigation&lt;/li&gt;
&lt;li&gt;Responsive layout with accessible controls, ARIA labels, and reduced-motion support&lt;/li&gt;
&lt;li&gt;Cloudflare Workers deployment with static assets&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Technology Stack&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;React 19 + TypeScript&lt;/li&gt;
&lt;li&gt;Bun runtime, package manager, and test runner&lt;/li&gt;
&lt;li&gt;Tailwind CSS v4&lt;/li&gt;
&lt;li&gt;Cloudflare Workers and Wrangler&lt;/li&gt;
&lt;li&gt;Biome for linting and formatting&lt;/li&gt;
&lt;li&gt;Bun Test, Testing Library, and happy-dom&lt;/li&gt;
&lt;/ul&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>PokeClaude</title><link>https://briansunter.com/projects/pokeclaude</link><guid isPermaLink="true">https://briansunter.com/projects/pokeclaude</guid><description>An MCP server for Pokémon TCG Pocket. Claude can search the full card pool, find synergies, build 20-card decks, and read the meta.</description><pubDate>Fri, 03 Oct 2025 05:37:07 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/pokeclaude-hero.CUXsUf5n_1jEkdB.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;PokeClaude is an MCP server (and Claude Code plugin) that gives Claude access to the full Pokémon TCG Pocket card pool (2,077 cards including art variants, 1,068 unique) backed by an in-memory DuckDB so SQL queries against the catalogue are instant. Claude uses it to search, score synergies, propose 20-card decks, and look up the current meta.&lt;/p&gt;
&lt;h2&gt;Features&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;7 MCP tools: search, filter, analyze, find synergies, find counters, deckbuild, meta&lt;/li&gt;
&lt;li&gt;Full card database (2,077 cards / 1,068 unique once art variants are deduped)&lt;/li&gt;
&lt;li&gt;DuckDB query engine; everything stays in-memory&lt;/li&gt;
&lt;li&gt;20-card deck construction with energy and trainer balance&lt;/li&gt;
&lt;li&gt;Tier lists and usage stats from current meta data&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Claude Code Plugin&lt;/h2&gt;
&lt;p&gt;Four slash commands ship with the plugin:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;/pokemon:build-deck&lt;/code&gt;: build a 20-card deck around a chosen Pokémon or strategy&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/pokemon:analyze&lt;/code&gt;: analyse a card’s stats and matchups&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/pokemon:find-counters&lt;/code&gt;: find counters to a deck or archetype&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/pokemon:meta&lt;/code&gt;: current tier list and meta breakdown&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Technology Stack&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;TypeScript MCP server (stdio transport)&lt;/li&gt;
&lt;li&gt;DuckDB for in-memory queries against the card data&lt;/li&gt;
&lt;li&gt;Web scraper that auto-refreshes the card data&lt;/li&gt;
&lt;li&gt;Claude Code plugin framework&lt;/li&gt;
&lt;li&gt;Distributed via npm / &lt;code&gt;bunx&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;How It Works&lt;/h2&gt;
&lt;p&gt;Install via npm or &lt;code&gt;bunx&lt;/code&gt; and add the server to your Claude config. On startup it loads the card data into DuckDB and exposes the tools listed above. Claude calls them when you ask deck-building or meta questions.&lt;/p&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Central Pacific Update</title><link>https://briansunter.com/central-pacific-update</link><guid isPermaLink="true">https://briansunter.com/central-pacific-update</guid><description>Life updates from the Pacific islands, plus what I&apos;ve been building and learning.</description><pubDate>Tue, 23 Sep 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/68d32d0a-a41f-4370-bf64-60dacba7e3ea.D8PuT-xD_rUyaQ.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;p&gt;I’m coming up on my third year living in Hawaii, and it’s been such a unique and energizing time in my life. Lately, I’ve been exploring the islands, working on my fitness, improving my cooking, and building several projects with AI.&lt;/p&gt;
&lt;h2&gt;Hawaii Life&lt;/h2&gt;
&lt;p&gt;I’m still really enjoying living in Honolulu. I’ve met a lot of interesting people and the overall vibe is noticeably more positive than anywhere else I’ve lived. It took some time to get used to strangers introducing themselves and striking up conversations, but the general friendliness and openness is one of my favorite parts of being here.&lt;/p&gt;
&lt;p&gt;We’ve made it to Maui, the Big Island, and Kauai, and each is unique and amazing in its own way. Oʻahu is a great jumping-off point since we can get to any of the other islands in less than an hour.&lt;/p&gt;
&lt;div&gt;
  &lt;iframe width=&quot;100%&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/0-PP_Rd3noM&quot; title=&quot;YouTube video&quot; frameborder=&quot;0&quot; loading=&quot;lazy&quot; allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;p&gt;I’ve been spending a lot of time outside and on the water. Open-water swimming has been my favorite recent activity. Oʻahu has great spots where you can swim long stretches along the beach and see coral formations and all kinds of sea life. I almost always see giant green sea turtles when I go out. I loved swimming, growing up in Florida, so it’s been great to reconnect with that.&lt;/p&gt;
&lt;div&gt;
  &lt;iframe width=&quot;100%&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/GgvQT1-uCsE&quot; title=&quot;YouTube video&quot; frameborder=&quot;0&quot; loading=&quot;lazy&quot; allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;p&gt;Paddleboarding has been another highlight. We have inflatable boards, so it’s easy to put them in the car and head to fantastic paddling spots around the islands like the Anahola River, Mokoliʻi Island, and the Kāneʻohe Sandbar.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Paddleboarding to Mokoliʻi Island&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1280px) 1280px, 100vw&quot; width=&quot;1280&quot; height=&quot;960&quot; src=&quot;https://briansunter.com/_astro/68d49886-b097-480c-873e-82b2cd3b242c.8Y6nn5Yw_Z2qDNvt.webp&quot; srcset=&quot;https://briansunter.com/_astro/68d49886-b097-480c-873e-82b2cd3b242c.8Y6nn5Yw_Z2gX7Lb.webp 640w, https://briansunter.com/_astro/68d49886-b097-480c-873e-82b2cd3b242c.8Y6nn5Yw_1i7KME.webp 750w, https://briansunter.com/_astro/68d49886-b097-480c-873e-82b2cd3b242c.8Y6nn5Yw_4rNvw.webp 828w, https://briansunter.com/_astro/68d49886-b097-480c-873e-82b2cd3b242c.8Y6nn5Yw_1Yd2FF.webp 1080w, https://briansunter.com/_astro/68d49886-b097-480c-873e-82b2cd3b242c.8Y6nn5Yw_Z2qDNvt.webp 1280w&quot; /&gt;&lt;figcaption&gt;Paddleboarding to Mokoliʻi Island&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;I tried hydrofoiling for the first time which was one of the coolest things I’ve ever done. It’s a board with a large hydrofoil and an electric motor controlled by a handheld remote. As you pick up speed, the board lifts and “floats” above the water. The glide feels unreal and, unexpectedly, it was pretty quick to get the hang of.&lt;/p&gt;
&lt;div&gt;
  &lt;iframe width=&quot;100%&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/E3SxzRI-s_k&quot; title=&quot;YouTube video&quot; frameborder=&quot;0&quot; loading=&quot;lazy&quot; allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;p&gt;Before moving, I made a “Hawaiʻi Bucket List” with hundreds of items. At this point I’ve checked off a lot, but I keep finding new places and things to do. It seems like there’s always an event going on. One standout day included a bird-conservation meetup in the morning, the Waikīkī Spam Jam festival in the afternoon, and an orchestra performance for the show Lost with a script-reading by some of the actors at night. On another day we stumbled upon a neighborhood fish fry while exploring the Kaimuki neighborhood.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Kaimuki Neighborhood Fish Fry&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 892px) 892px, 100vw&quot; width=&quot;892&quot; height=&quot;1280&quot; src=&quot;https://briansunter.com/_astro/68d35ced-fcb5-43f1-b644-225e939059f7.QOtszVHY_oFlVX.webp&quot; srcset=&quot;https://briansunter.com/_astro/68d35ced-fcb5-43f1-b644-225e939059f7.QOtszVHY_ZnBKp3.webp 640w, https://briansunter.com/_astro/68d35ced-fcb5-43f1-b644-225e939059f7.QOtszVHY_ZkaOsk.webp 750w, https://briansunter.com/_astro/68d35ced-fcb5-43f1-b644-225e939059f7.QOtszVHY_Z1C187f.webp 828w, https://briansunter.com/_astro/68d35ced-fcb5-43f1-b644-225e939059f7.QOtszVHY_oFlVX.webp 892w&quot; /&gt;&lt;figcaption&gt;Kaimuki Neighborhood Fish Fry&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;It’s been a good year for spending time outside, meeting people, and trying new things.&lt;/p&gt;
&lt;h2&gt;Fitness&lt;/h2&gt;
&lt;p&gt;Improving my health and fitness has been my biggest goal, specifically gaining muscle and losing fat. For a few years, I’ve been tracking body fat, muscle mass, and visceral fat with DEXA scans. I find them far more useful than a scale alone since they give an extremely accurate measurement. There have been some ups and downs, but overall I’ve added 14 pounds of muscle while maintaining the same body-fat level, which I’m pretty happy with. Closely watching the scans for years taught me two important lessons: muscle growth is incredibly slow (I average about 0.5 pounds per month when consistent), and fat gain can happen surprisingly fast.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Dexa scan results&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 832px) 832px, 100vw&quot; width=&quot;832&quot; height=&quot;1193&quot; src=&quot;https://briansunter.com/_astro/68d20fe0-223d-4c18-a1a7-afaa912ecf77.CHO0F7wD_KLChK.webp&quot; srcset=&quot;https://briansunter.com/_astro/68d20fe0-223d-4c18-a1a7-afaa912ecf77.CHO0F7wD_XrosV.webp 640w, https://briansunter.com/_astro/68d20fe0-223d-4c18-a1a7-afaa912ecf77.CHO0F7wD_iR0zg.webp 750w, https://briansunter.com/_astro/68d20fe0-223d-4c18-a1a7-afaa912ecf77.CHO0F7wD_1atAnB.webp 828w, https://briansunter.com/_astro/68d20fe0-223d-4c18-a1a7-afaa912ecf77.CHO0F7wD_KLChK.webp 832w&quot; /&gt;&lt;figcaption&gt;Dexa scan results&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Understanding my actual historical rate of progress has helped me set realistic expectations and stay motivated. At my current pace, it will take about three more years to reach my goal of being lean at 185 pounds. It feels like a long time, but I’ve changed my mentality to making my routines highly sustainable rather than forcing short-term results and burning out. The overall routine includes strength training 3x per week, very short HIIT 2x per week, and moderate cardio 3x per week.&lt;/p&gt;
&lt;p&gt;For the rest of the year, I’m focusing on improving my lower body mobility issues that have been limiting my squat progress. I’m following daily mobility routines based on YouTube videos and ChatGPT research.&lt;/p&gt;
&lt;h2&gt;Cooking&lt;/h2&gt;
&lt;p&gt;Cooking has become one of my most rewarding hobbies. I have an ambitious goal of making meals that are healthy, tasty, varied, and time-efficient. After years of optimizing my process, I’ve reached a point where I usually prefer my own cooking to eating out, and it doesn’t take an excessive amount of time to prepare.&lt;/p&gt;
&lt;p&gt;One of the things I like most about cooking is that I can completely customize the recipes to my taste and use the highest quality ingredients possible. For example, in my sandwich recipe, after much trial and error, I’m particular about every ingredient: the type of flour, oil, mayo, vinegar, etc. I’ve learned a lot of tricks to make my overall meal prep more efficient and tasty, like making dough in bulk ahead of time and using it over multiple days, then baking it just in time so it’s warm and fresh. My favorite thing to cook is homemade pizza, especially these poofy Neapolitan-ish personal pizzas.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Poofy Neapolitan-ish personal pizza&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1920px) 1920px, 100vw&quot; width=&quot;1920&quot; height=&quot;2590&quot; src=&quot;https://briansunter.com/_astro/68d21477-cdbb-4731-9701-bc378f9cefe2.DOQczHDi_Z2bqFoW.webp&quot; srcset=&quot;https://briansunter.com/_astro/68d21477-cdbb-4731-9701-bc378f9cefe2.DOQczHDi_1HOvcC.webp 640w, https://briansunter.com/_astro/68d21477-cdbb-4731-9701-bc378f9cefe2.DOQczHDi_ZYbvRv.webp 750w, https://briansunter.com/_astro/68d21477-cdbb-4731-9701-bc378f9cefe2.DOQczHDi_Z1usQIh.webp 828w, https://briansunter.com/_astro/68d21477-cdbb-4731-9701-bc378f9cefe2.DOQczHDi_kfD3n.webp 1080w, https://briansunter.com/_astro/68d21477-cdbb-4731-9701-bc378f9cefe2.DOQczHDi_Z1acJjF.webp 1280w, https://briansunter.com/_astro/68d21477-cdbb-4731-9701-bc378f9cefe2.DOQczHDi_Z2r7064.webp 1668w, https://briansunter.com/_astro/68d21477-cdbb-4731-9701-bc378f9cefe2.DOQczHDi_Z2bqFoW.webp 1920w&quot; /&gt;&lt;figcaption&gt;Poofy Neapolitan-ish personal pizza&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;I feel healthier, I genuinely enjoy the food I make, and I’m saving a lot of money, so this is a hobby I plan to keep investing in for a long time.&lt;/p&gt;
&lt;h2&gt;AI coding&lt;/h2&gt;

  &lt;div class=&quot;not-prose tweet-embed&quot;&gt;
    &lt;div class=&quot;tweet-card&quot;&gt;
      &lt;a href=&quot;https://twitter.com/karpathy/status/1617979122625712128&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;&lt;/a&gt;
      &lt;div class=&quot;tweet-header&quot;&gt;
        &lt;div class=&quot;tweet-author&quot;&gt;
          &lt;img src=&quot;https://pbs.twimg.com/profile_images/1296667294148382721/9Pr6XrPB_normal.jpg&quot; alt=&quot;Andrej Karpathy&apos;s avatar&quot; /&gt;
          &lt;div class=&quot;tweet-author-info&quot;&gt;
            &lt;a href=&quot;https://twitter.com/karpathy/status/1617979122625712128&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
              &lt;div class=&quot;tweet-author-name-row&quot;&gt;
                &lt;span class=&quot;tweet-author-name&quot;&gt;Andrej Karpathy&lt;/span&gt;
                

  


              &lt;/div&gt;
            &lt;/a&gt;
            &lt;span class=&quot;tweet-author-handle&quot;&gt;@karpathy&lt;/span&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;a href=&quot;https://twitter.com/karpathy/status/1617979122625712128&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;

  
    
  

&lt;/a&gt;
      &lt;/div&gt;
      
      &lt;div class=&quot;tweet-body&quot;&gt;The hottest new programming language is English&lt;/div&gt;
      
      
      &lt;a href=&quot;https://twitter.com/karpathy/status/1617979122625712128&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
        &lt;span class=&quot;tweet-timestamp&quot;&gt;Jan 24, 2023, 8:14 PM&lt;/span&gt;
      &lt;/a&gt;
      &lt;hr /&gt;
      &lt;div class=&quot;tweet-actions&quot;&gt;
        &lt;div class=&quot;tweet-action tweet-action-like&quot;&gt;
          

  
    
  


          &lt;span&gt;71.1K&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class=&quot;tweet-action tweet-action-reply&quot;&gt;
          

  
    
  


          &lt;span&gt;2.2K&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  
&lt;p&gt;My biggest technical interest lately has been using AI to write code. I’ve been coding with AI for a while using tools like Cursor, but there have been a lot of advancements this year. My new workflow involves directing AI to write code for me. Now, my role is mostly reviewing and iterating. This new type of coding is powered by a breakthrough called “agents,” where instead of chatting back and forth with an AI one message at a time, you give the AI a task and it runs on its own and performs actions until the task is done.&lt;/p&gt;

  &lt;div class=&quot;not-prose tweet-embed&quot;&gt;
    &lt;div class=&quot;tweet-card&quot;&gt;
      &lt;a href=&quot;https://twitter.com/karpathy/status/1886192184808149383&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;&lt;/a&gt;
      &lt;div class=&quot;tweet-header&quot;&gt;
        &lt;div class=&quot;tweet-author&quot;&gt;
          &lt;img src=&quot;https://pbs.twimg.com/profile_images/1296667294148382721/9Pr6XrPB_normal.jpg&quot; alt=&quot;Andrej Karpathy&apos;s avatar&quot; /&gt;
          &lt;div class=&quot;tweet-author-info&quot;&gt;
            &lt;a href=&quot;https://twitter.com/karpathy/status/1886192184808149383&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
              &lt;div class=&quot;tweet-author-name-row&quot;&gt;
                &lt;span class=&quot;tweet-author-name&quot;&gt;Andrej Karpathy&lt;/span&gt;
                

  


              &lt;/div&gt;
            &lt;/a&gt;
            &lt;span class=&quot;tweet-author-handle&quot;&gt;@karpathy&lt;/span&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;a href=&quot;https://twitter.com/karpathy/status/1886192184808149383&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;

  
    
  

&lt;/a&gt;
      &lt;/div&gt;
      
      &lt;div class=&quot;tweet-body&quot;&gt;There&apos;s a new kind of coding I call &quot;vibe coding&quot;, where you fully give in to the vibes, embrace exponentials, and forget that the code even exists. It&apos;s possible because the LLMs (e.g. Cursor Composer w Sonnet) are getting too good. Also I just talk to Composer with SuperWhisper&lt;/div&gt;
      
      
      &lt;a href=&quot;https://twitter.com/karpathy/status/1886192184808149383&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
        &lt;span class=&quot;tweet-timestamp&quot;&gt;Feb 2, 2025, 11:17 PM&lt;/span&gt;
      &lt;/a&gt;
      &lt;hr /&gt;
      &lt;div class=&quot;tweet-actions&quot;&gt;
        &lt;div class=&quot;tweet-action tweet-action-like&quot;&gt;
          

  
    
  


          &lt;span&gt;34.0K&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class=&quot;tweet-action tweet-action-reply&quot;&gt;
          

  
    
  


          &lt;span&gt;1.5K&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  
&lt;p&gt;AI Coding is definitely a new skill that requires practice. To get the most out of AI coding, you need to provide very clear instructions, proper context like documentation, and external tools such as shell commands and web browsers. For experienced coders, AI is a massive productivity multiplier. For non-coders, while it’s not quite ready to build substantial apps without coding knowledge, it’s getting closer every day. Right now, my favorite tool is Claude Code, but others like OpenAI’s Codex and Google’s Gemini are catching up quickly.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Claude Code, a terminal AI coding tool.&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1080px) 1080px, 100vw&quot; width=&quot;1080&quot; height=&quot;607&quot; src=&quot;https://briansunter.com/_astro/68d21535-9488-4241-a3c4-60d4ed752bc4.CYC6DdG1_U3Ts7.webp&quot; srcset=&quot;https://briansunter.com/_astro/68d21535-9488-4241-a3c4-60d4ed752bc4.CYC6DdG1_Z23iLIE.webp 640w, https://briansunter.com/_astro/68d21535-9488-4241-a3c4-60d4ed752bc4.CYC6DdG1_Z1oSsTL.webp 750w, https://briansunter.com/_astro/68d21535-9488-4241-a3c4-60d4ed752bc4.CYC6DdG1_1sK9EI.webp 828w, https://briansunter.com/_astro/68d21535-9488-4241-a3c4-60d4ed752bc4.CYC6DdG1_U3Ts7.webp 1080w&quot; /&gt;&lt;figcaption&gt;Claude Code, a terminal AI coding tool.&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;I’m turning my high-level development processes into something AI agents can execute.&lt;/p&gt;
&lt;p&gt;For example, I tell the agent to build a feature, and it runs for 10-15 minutes while it:&lt;/p&gt;
&lt;p&gt;Explores my codebase to gather context&lt;/p&gt;
&lt;p&gt;Searches the internet for references and documentation&lt;/p&gt;
&lt;p&gt;Writes the code&lt;/p&gt;
&lt;p&gt;Creates tests&lt;/p&gt;
&lt;p&gt;Opens a browser to interact with the app as a user would&lt;/p&gt;
&lt;p&gt;Now I focus more on specifying requirements, validating outputs, and designing the overall workflow than some of the low-level coding details. I’m incredibly optimistic about agentic coding. It’s already transforming the software industry, and I expect these “agentic” tools to expand beyond coding into fields like education, medicine, and law.&lt;/p&gt;
&lt;p&gt;Developers always get the best tools first, but “AI Copilots” will be everywhere soon.&lt;/p&gt;

  &lt;div class=&quot;not-prose tweet-embed&quot;&gt;
    &lt;div class=&quot;tweet-card&quot;&gt;
      &lt;a href=&quot;https://twitter.com/naval/status/1875297712993964231&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;&lt;/a&gt;
      &lt;div class=&quot;tweet-header&quot;&gt;
        &lt;div class=&quot;tweet-author&quot;&gt;
          &lt;img src=&quot;https://pbs.twimg.com/profile_images/1256841238298292232/ycqwaMI2_normal.jpg&quot; alt=&quot;Naval&apos;s avatar&quot; /&gt;
          &lt;div class=&quot;tweet-author-info&quot;&gt;
            &lt;a href=&quot;https://twitter.com/naval/status/1875297712993964231&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
              &lt;div class=&quot;tweet-author-name-row&quot;&gt;
                &lt;span class=&quot;tweet-author-name&quot;&gt;Naval&lt;/span&gt;
                

  


              &lt;/div&gt;
            &lt;/a&gt;
            &lt;span class=&quot;tweet-author-handle&quot;&gt;@naval&lt;/span&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;a href=&quot;https://twitter.com/naval/status/1875297712993964231&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;

  
    
  

&lt;/a&gt;
      &lt;/div&gt;
      
      &lt;div class=&quot;tweet-body&quot;&gt;AI won’t replace programmers, but rather make it easier for programmers to replace everyone else.&lt;/div&gt;
      
      
      &lt;a href=&quot;https://twitter.com/naval/status/1875297712993964231&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
        &lt;span class=&quot;tweet-timestamp&quot;&gt;Jan 3, 2025, 9:46 PM&lt;/span&gt;
      &lt;/a&gt;
      &lt;hr /&gt;
      &lt;div class=&quot;tweet-actions&quot;&gt;
        &lt;div class=&quot;tweet-action tweet-action-like&quot;&gt;
          

  
    
  


          &lt;span&gt;28.4K&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class=&quot;tweet-action tweet-action-reply&quot;&gt;
          

  
    
  


          &lt;span&gt;1.1K&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  
&lt;h2&gt;Projects&lt;/h2&gt;
&lt;p&gt;My main goal now is to keep launching products, both using AI to create them and incorporating AI into the products themselves. I’ve released several projects so far and have lots of prototypes and ideas in the pipeline. Starting with simple products, I’m now beginning to build some more ambitious ones.&lt;/p&gt;

  &lt;div class=&quot;not-prose tweet-embed&quot;&gt;
    &lt;div class=&quot;tweet-card&quot;&gt;
      &lt;a href=&quot;https://twitter.com/sama/status/1952084574366032354&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;&lt;/a&gt;
      &lt;div class=&quot;tweet-header&quot;&gt;
        &lt;div class=&quot;tweet-author&quot;&gt;
          &lt;img src=&quot;https://pbs.twimg.com/profile_images/2046764873200394240/r7BxVezs_normal.jpg&quot; alt=&quot;Sam Altman&apos;s avatar&quot; /&gt;
          &lt;div class=&quot;tweet-author-info&quot;&gt;
            &lt;a href=&quot;https://twitter.com/sama/status/1952084574366032354&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
              &lt;div class=&quot;tweet-author-name-row&quot;&gt;
                &lt;span class=&quot;tweet-author-name&quot;&gt;Sam Altman&lt;/span&gt;
                

  


              &lt;/div&gt;
            &lt;/a&gt;
            &lt;span class=&quot;tweet-author-handle&quot;&gt;@sama&lt;/span&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;a href=&quot;https://twitter.com/sama/status/1952084574366032354&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;

  
    
  

&lt;/a&gt;
      &lt;/div&gt;
      
      &lt;div class=&quot;tweet-body&quot;&gt;entering the fast fashion era of SaaS very soon&lt;/div&gt;
      
      
      &lt;a href=&quot;https://twitter.com/sama/status/1952084574366032354&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
        &lt;span class=&quot;tweet-timestamp&quot;&gt;Aug 3, 2025, 7:10 PM&lt;/span&gt;
      &lt;/a&gt;
      &lt;hr /&gt;
      &lt;div class=&quot;tweet-actions&quot;&gt;
        &lt;div class=&quot;tweet-action tweet-action-like&quot;&gt;
          

  
    
  


          &lt;span&gt;19.1K&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class=&quot;tweet-action tweet-action-reply&quot;&gt;
          

  
    
  


          &lt;span&gt;1.5K&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  
&lt;p&gt;Here’s a few of the projects I’ve released so far:&lt;/p&gt;
&lt;h3&gt;ConvoCards&lt;/h3&gt;
&lt;p&gt;A digital conversation card game featuring question packs on topics ranging from relationships to family dynamics to deep philosophical dives. The feedback for this one has been wonderful and I love hearing how you’ve been using this at family gatherings and even in the classroom!&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://convo.cards/&quot;&gt;Go here to check out ConvoCards&lt;/a&gt;&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Convocards Screenshot&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1200px) 1200px, 100vw&quot; width=&quot;1200&quot; height=&quot;660&quot; src=&quot;https://briansunter.com/_astro/68d216c6-83e5-4b3a-bfa1-57f241043126.D0-Bj3SI_IN3pI.webp&quot; srcset=&quot;https://briansunter.com/_astro/68d216c6-83e5-4b3a-bfa1-57f241043126.D0-Bj3SI_Z2pmeT2.webp 640w, https://briansunter.com/_astro/68d216c6-83e5-4b3a-bfa1-57f241043126.D0-Bj3SI_ZC2qsc.webp 750w, https://briansunter.com/_astro/68d216c6-83e5-4b3a-bfa1-57f241043126.D0-Bj3SI_Z1FFr4G.webp 828w, https://briansunter.com/_astro/68d216c6-83e5-4b3a-bfa1-57f241043126.D0-Bj3SI_Bm37G.webp 1080w, https://briansunter.com/_astro/68d216c6-83e5-4b3a-bfa1-57f241043126.D0-Bj3SI_IN3pI.webp 1200w&quot; /&gt;&lt;figcaption&gt;Convocards Screenshot&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h3&gt;Pizzaplan&lt;/h3&gt;
&lt;p&gt;The ultimate pizza-making tool, combining food science with artisan techniques for perfect homemade pizza. This came from my pizza-making hobby, and the app distills extensive research from forums, scientific papers, YouTube channels, and books, plus my own experiments.&lt;/p&gt;
&lt;p&gt;It has a step-by-step wizard that considers your pizza style preferences, climate conditions, and schedule to generate a minute-by-minute plan. Unlike static recipes, it calculates timings and ingredient quantities based on your environmental temperature and humidity so you get perfect results every time.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://getpizzaplan.com/&quot;&gt;Go here to check out Pizzaplan&lt;/a&gt;&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Pizzaplan Screenshot&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1908px) 1908px, 100vw&quot; width=&quot;1908&quot; height=&quot;1602&quot; src=&quot;https://briansunter.com/_astro/68d217c4-5675-4ea8-b314-9bfc79c4063c.CmQDRs4Y_Z1y2R4J.webp&quot; srcset=&quot;https://briansunter.com/_astro/68d217c4-5675-4ea8-b314-9bfc79c4063c.CmQDRs4Y_Z2gcJHJ.webp 640w, https://briansunter.com/_astro/68d217c4-5675-4ea8-b314-9bfc79c4063c.CmQDRs4Y_Z1MyfYj.webp 750w, https://briansunter.com/_astro/68d217c4-5675-4ea8-b314-9bfc79c4063c.CmQDRs4Y_26jyXu.webp 828w, https://briansunter.com/_astro/68d217c4-5675-4ea8-b314-9bfc79c4063c.CmQDRs4Y_VSmHH.webp 1080w, https://briansunter.com/_astro/68d217c4-5675-4ea8-b314-9bfc79c4063c.CmQDRs4Y_1sGgiD.webp 1280w, https://briansunter.com/_astro/68d217c4-5675-4ea8-b314-9bfc79c4063c.CmQDRs4Y_ZpPiYC.webp 1668w, https://briansunter.com/_astro/68d217c4-5675-4ea8-b314-9bfc79c4063c.CmQDRs4Y_Z1y2R4J.webp 1908w&quot; /&gt;&lt;figcaption&gt;Pizzaplan Screenshot&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h3&gt;Cuckootimer&lt;/h3&gt;
&lt;p&gt;Take regular breaks and be mindful of time with a 3D animated cuckoo
clock. A minimal macOS menu bar app with a 3D cuckoo clock that appears
at set time intervals. Everyone’s had those “where did the day go?” moments, so I made this to be more aware of time passing and avoid getting too hyperfocused on my projects.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://cuckootimer.com/&quot;&gt;Go here to check out Cuckootimer&lt;/a&gt;&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Cuckootimer productivity app&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1689px) 1689px, 100vw&quot; width=&quot;1689&quot; height=&quot;1164&quot; src=&quot;https://briansunter.com/_astro/68d33375-893f-4b6d-a9cf-ded14eac10d3.Ck9NLnn7_1soj3u.webp&quot; srcset=&quot;https://briansunter.com/_astro/68d33375-893f-4b6d-a9cf-ded14eac10d3.Ck9NLnn7_Ou8OU.webp 640w, https://briansunter.com/_astro/68d33375-893f-4b6d-a9cf-ded14eac10d3.Ck9NLnn7_1zKTFe.webp 750w, https://briansunter.com/_astro/68d33375-893f-4b6d-a9cf-ded14eac10d3.Ck9NLnn7_Z2r9IOo.webp 828w, https://briansunter.com/_astro/68d33375-893f-4b6d-a9cf-ded14eac10d3.Ck9NLnn7_ZDUmbN.webp 1080w, https://briansunter.com/_astro/68d33375-893f-4b6d-a9cf-ded14eac10d3.Ck9NLnn7_2bnwFH.webp 1280w, https://briansunter.com/_astro/68d33375-893f-4b6d-a9cf-ded14eac10d3.Ck9NLnn7_2e9pHa.webp 1668w, https://briansunter.com/_astro/68d33375-893f-4b6d-a9cf-ded14eac10d3.Ck9NLnn7_1soj3u.webp 1689w&quot; /&gt;&lt;figcaption&gt;Cuckootimer productivity app&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Good year for exploring, exercising, cooking, and making apps with AI. More projects in the works.&lt;/p&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator><category>blog</category></item><item><title>Raindrop MCP</title><link>https://briansunter.com/projects/raindrop-mcp</link><guid isPermaLink="true">https://briansunter.com/projects/raindrop-mcp</guid><description>An MCP server for Raindrop.io, letting Claude (or any MCP client) read, write, and reorganise your bookmarks, collections, tags, and highlights.</description><pubDate>Sun, 21 Sep 2025 04:55:25 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/raindrop-mcp-hero.BkgLujFJ_1GxoHf.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;Raindrop MCP exposes the &lt;a href=&quot;https://raindrop.io/&quot;&gt;Raindrop.io&lt;/a&gt; API as an MCP server, so Claude and other MCP clients can search bookmarks, create new ones, manage collection trees, and clean up tags conversationally instead of through the Raindrop UI.&lt;/p&gt;
&lt;p&gt;I built it because most of my “save for later” links live in Raindrop, and being able to ask “find me everything I saved about Postgres last year and tag it &lt;code&gt;db&lt;/code&gt;” is much faster than clicking through the web app.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Raindrop MCP architecture diagram&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1536px) 1536px, 100vw&quot; width=&quot;1536&quot; height=&quot;1024&quot; src=&quot;https://briansunter.com/_astro/raindrop-mcp-explainer.OSlbfVCM_Z99VwB.webp&quot; srcset=&quot;https://briansunter.com/_astro/raindrop-mcp-explainer.OSlbfVCM_Z12RRd7.webp 640w, https://briansunter.com/_astro/raindrop-mcp-explainer.OSlbfVCM_N7BFN.webp 750w, https://briansunter.com/_astro/raindrop-mcp-explainer.OSlbfVCM_Z2mEV1q.webp 828w, https://briansunter.com/_astro/raindrop-mcp-explainer.OSlbfVCM_UljY8.webp 1080w, https://briansunter.com/_astro/raindrop-mcp-explainer.OSlbfVCM_ZMNx1k.webp 1280w, https://briansunter.com/_astro/raindrop-mcp-explainer.OSlbfVCM_Z99VwB.webp 1536w&quot; /&gt;&lt;figcaption&gt;Raindrop MCP architecture diagram&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2&gt;Features&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Create, search, update, delete bookmarks&lt;/li&gt;
&lt;li&gt;Browse and manage nested collections&lt;/li&gt;
&lt;li&gt;List, merge, rename, and clean up tags&lt;/li&gt;
&lt;li&gt;Pull metadata from any URL (title, description, og-image)&lt;/li&gt;
&lt;li&gt;Raindrop’s full search syntax (&lt;code&gt;#tag&lt;/code&gt;, &lt;code&gt;site:&lt;/code&gt;, &lt;code&gt;type:&lt;/code&gt;, etc.)&lt;/li&gt;
&lt;li&gt;Field filtering so responses stay small&lt;/li&gt;
&lt;li&gt;Bulk operations for tag-rewrite migrations&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Available Tools&lt;/h2&gt;
&lt;h3&gt;Bookmarks&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;list-raindrops&lt;/code&gt;: list bookmarks in a collection&lt;/li&gt;
&lt;li&gt;&lt;code&gt;search-raindrops&lt;/code&gt;: search with Raindrop’s query syntax&lt;/li&gt;
&lt;li&gt;&lt;code&gt;create-raindrop&lt;/code&gt;: save a new bookmark, auto-parsed from URL&lt;/li&gt;
&lt;li&gt;&lt;code&gt;update-raindrop&lt;/code&gt; / &lt;code&gt;delete-raindrop&lt;/code&gt;: edit or remove existing bookmarks&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Collections &amp;amp; Tags&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;list-collections&lt;/code&gt; / &lt;code&gt;create-collection&lt;/code&gt;: manage the folder tree&lt;/li&gt;
&lt;li&gt;&lt;code&gt;list-tags&lt;/code&gt; / &lt;code&gt;merge-tags&lt;/code&gt;: clean up your tag taxonomy&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Utilities&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;parse-url&lt;/code&gt;: pull metadata from a URL without saving it&lt;/li&gt;
&lt;li&gt;&lt;code&gt;check-url-exists&lt;/code&gt;: duplicate-check before adding&lt;/li&gt;
&lt;li&gt;&lt;code&gt;list-highlights&lt;/code&gt;: read your saved highlights&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Installation&lt;/h2&gt;
&lt;p&gt;Add to your Claude Desktop config and set your Raindrop API token:&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;json&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;  &quot;mcpServers&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;    &quot;raindrop&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;      &quot;command&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;npx&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;      &quot;args&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: [&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;-y&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;@briansunter/raindrop-mcp&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;      &quot;env&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;        &quot;RAINDROP_TOKEN&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;your-token-here&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;      }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h2&gt;Technology Stack&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;TypeScript MCP server (stdio)&lt;/li&gt;
&lt;li&gt;Raindrop.io REST API&lt;/li&gt;
&lt;li&gt;Field filtering and pagination&lt;/li&gt;
&lt;li&gt;Distributed via npm / &lt;code&gt;bunx&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Anki AI</title><link>https://briansunter.com/projects/anki-ai</link><guid isPermaLink="true">https://briansunter.com/projects/anki-ai</guid><description>An MCP server that exposes 45 Anki tools to Claude. Generate cards from text, audit decks, reschedule failures, and analyse your review history.</description><pubDate>Wed, 03 Sep 2025 09:59:22 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/anki-ai-hero.CJLjSt3T_1FSmsh.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;Anki AI is an MCP server that wraps Anki’s local API and surfaces it to Claude as 45 tools, covering everything from card creation to deck stats. The point is to use Claude as the front door for the parts of Anki that are tedious in the desktop app: bulk tag rewrites, generating cloze cards from a PDF, finding the cards you keep failing.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Anki AI tool capabilities diagram&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1536px) 1536px, 100vw&quot; width=&quot;1536&quot; height=&quot;1024&quot; src=&quot;https://briansunter.com/_astro/anki-ai-explainer.CNbV0sAP_Z1gLh8S.webp&quot; srcset=&quot;https://briansunter.com/_astro/anki-ai-explainer.CNbV0sAP_Z2eEEkm.webp 640w, https://briansunter.com/_astro/anki-ai-explainer.CNbV0sAP_2d9Mjn.webp 750w, https://briansunter.com/_astro/anki-ai-explainer.CNbV0sAP_ZWPQmQ.webp 828w, https://briansunter.com/_astro/anki-ai-explainer.CNbV0sAP_Z2quCWp.webp 1080w, https://briansunter.com/_astro/anki-ai-explainer.CNbV0sAP_LhnQN.webp 1280w, https://briansunter.com/_astro/anki-ai-explainer.CNbV0sAP_Z1gLh8S.webp 1536w&quot; /&gt;&lt;figcaption&gt;Anki AI tool capabilities diagram&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2&gt;Features&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;45 tools covering cards, notes, decks, models, media, stats, and the Anki UI&lt;/li&gt;
&lt;li&gt;Generate cards from any text, PDF, or webpage&lt;/li&gt;
&lt;li&gt;Reschedule failures and tweak intervals based on your history&lt;/li&gt;
&lt;li&gt;Spot duplicates, leeches, and stale cards&lt;/li&gt;
&lt;li&gt;Bulk tag/move/update operations with auto-batching for large decks&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;What You Can Do&lt;/h2&gt;
&lt;h3&gt;Create Learning Content&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Generate flashcards from PDFs, articles, or pasted text&lt;/li&gt;
&lt;li&gt;Cloze deletions for terminology&lt;/li&gt;
&lt;li&gt;Image-occlusion cards from diagrams&lt;/li&gt;
&lt;li&gt;Cards with audio for language learning&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Review Management&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Find difficult cards and analyse why they’re hard&lt;/li&gt;
&lt;li&gt;Reschedule failed cards based on actual performance&lt;/li&gt;
&lt;li&gt;Stretch intervals on cards you clearly know&lt;/li&gt;
&lt;li&gt;Detect and merge duplicates&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Mnemonics &amp;amp; Stories&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Generate stories that use today’s due vocabulary&lt;/li&gt;
&lt;li&gt;Mnemonic prompts for formulas&lt;/li&gt;
&lt;li&gt;Memory-palace scaffolding&lt;/li&gt;
&lt;li&gt;Example sentences in context&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Analytics&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Look at review patterns over time&lt;/li&gt;
&lt;li&gt;Predict which cards are about to lapse&lt;/li&gt;
&lt;li&gt;Surface knowledge gaps by tag or deck&lt;/li&gt;
&lt;li&gt;Track progress on a per-subject basis&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Tool Categories&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Cards&lt;/strong&gt; (15): query, info, state, queue management&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Notes&lt;/strong&gt; (10): CRUD and tag management&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Decks&lt;/strong&gt; (7): create, delete, configure, stats&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Models&lt;/strong&gt; (5): query and create card templates&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Media&lt;/strong&gt; (3): store and retrieve files&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Stats &amp;amp; GUI&lt;/strong&gt; (5): analytics and interface control&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Installation&lt;/h2&gt;
&lt;p&gt;Requires Anki running locally with the Anki-Connect add-on (code: &lt;code&gt;2055492159&lt;/code&gt;).&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;json&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;  &quot;mcpServers&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;    &quot;anki&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;      &quot;command&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;npx&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;      &quot;args&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: [&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;anki-ai&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h2&gt;Technology Stack&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;TypeScript MCP server with Zod-validated input&lt;/li&gt;
&lt;li&gt;Anki-Connect API&lt;/li&gt;
&lt;li&gt;Pagination and auto-batching for large decks&lt;/li&gt;
&lt;li&gt;Distributed via npm / &lt;code&gt;bunx&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>BlogSeq</title><link>https://briansunter.com/projects/blogseq</link><guid isPermaLink="true">https://briansunter.com/projects/blogseq</guid><description>A Logseq plugin that exports a page to clean Markdown and bundles every referenced image and asset alongside it. Works as a drop-in for Jekyll, Hugo, Astro, etc.</description><pubDate>Mon, 01 Sep 2025 02:33:16 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/blogseq-hero.B0LTc9mR_VQ7WW.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;BlogSeq exports a Logseq page to portable Markdown. Properties become YAML frontmatter, block and page references resolve to readable text, and every image referenced anywhere in the tree (including UUID-based references buried in properties) is found and bundled into an &lt;code&gt;/assets/&lt;/code&gt; folder, with all paths rewritten to point at it.&lt;/p&gt;
&lt;p&gt;I built it because publishing from Logseq used to mean copy-pasting Markdown and then chasing down broken images by hand. BlogSeq makes the export hand-off zero-touch.&lt;/p&gt;
&lt;h2&gt;Features&lt;/h2&gt;
&lt;h3&gt;Asset bundling&lt;/h3&gt;
&lt;p&gt;The thing that took the most work to get right:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Walks blocks, properties, and nested references for image links&lt;/li&gt;
&lt;li&gt;Resolves UUID-based asset references to real files on disk&lt;/li&gt;
&lt;li&gt;Drops everything into a single &lt;code&gt;/assets/&lt;/code&gt; directory&lt;/li&gt;
&lt;li&gt;Rewrites links in the Markdown to relative paths&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;YAML frontmatter&lt;/h3&gt;
&lt;p&gt;Logseq page properties come out as standard YAML frontmatter. Slot it straight into Jekyll, Hugo, Astro, or anything else that expects frontmatter at the top of a file.&lt;/p&gt;
&lt;h3&gt;Reference resolution&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;((block-references))&lt;/code&gt; resolved to the referenced block’s text&lt;/li&gt;
&lt;li&gt;&lt;code&gt;[[page links]]&lt;/code&gt; rendered as readable text&lt;/li&gt;
&lt;li&gt;Nested and recursive references handled&lt;/li&gt;
&lt;li&gt;Image references-by-UUID inside properties resolved&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Live preview&lt;/h3&gt;
&lt;p&gt;See the rendered Markdown before exporting.&lt;/p&gt;
&lt;h2&gt;Export Options&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Copy to clipboard&lt;/li&gt;
&lt;li&gt;Download a single &lt;code&gt;.md&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Download a &lt;code&gt;.zip&lt;/code&gt; with the Markdown plus every asset&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Configuration&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Page name as H1&lt;/li&gt;
&lt;li&gt;Flatten blocks into paragraphs&lt;/li&gt;
&lt;li&gt;Include / exclude properties&lt;/li&gt;
&lt;li&gt;Preserve or strip Logseq-specific markup&lt;/li&gt;
&lt;li&gt;Resolve or keep block / page references&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Technology Stack&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;React 18 + TypeScript&lt;/li&gt;
&lt;li&gt;Vite&lt;/li&gt;
&lt;li&gt;Tailwind CSS&lt;/li&gt;
&lt;li&gt;JSZip for the bundle&lt;/li&gt;
&lt;li&gt;Logseq Plugin API&lt;/li&gt;
&lt;/ul&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>CuckooTimer</title><link>https://briansunter.com/projects/cuckootimer</link><guid isPermaLink="true">https://briansunter.com/projects/cuckootimer</guid><description>A 3D cuckoo-clock that lives in your macOS menu bar. Every 30 minutes the doors swing open and a tiny bird reminds you the morning is gone.</description><pubDate>Mon, 21 Jul 2025 03:38:59 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/cuckootimer-hero.B4CXuy1l_Zy6DH6.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;CuckooTimer is a macOS menu-bar app that exists for one reason: I wanted a cuckoo clock without owning a real cuckoo clock. It hides in the menu bar, ticks quietly in the background, and on a configurable interval (15, 30, or 60 minutes) pops open a little 3D scene where the doors swing open and the bird sings. Then it tucks itself away again.&lt;/p&gt;
&lt;p&gt;It’s a stretch to call it a productivity tool. It’s a pleasant interruption.&lt;/p&gt;
&lt;h2&gt;Features&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Lives in the menu bar; no Dock icon&lt;/li&gt;
&lt;li&gt;Animated 3D scene with procedural wood, swinging pendulum, opening doors, and a bird that pops out&lt;/li&gt;
&lt;li&gt;Intervals of 15, 30, or 60 minutes&lt;/li&gt;
&lt;li&gt;Three modes: appear only on cuckoo, always visible, or sound only&lt;/li&gt;
&lt;li&gt;Working-hours window so it doesn’t chirp at you on a Sunday morning&lt;/li&gt;
&lt;li&gt;Optional ticking and chirp sounds&lt;/li&gt;
&lt;li&gt;Self-hosted update channel&lt;/li&gt;
&lt;li&gt;$3.99 one-time purchase, no subscription&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;How It Works&lt;/h2&gt;
&lt;p&gt;Set the interval. The Rust backend tracks time in the background. When the timer fires, the doors animate open, the bird emerges, the chirp plays, and the window auto-hides after the animation. That’s the whole loop.&lt;/p&gt;
&lt;h2&gt;Technology Stack&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Desktop App&lt;/strong&gt;: Rust with Tauri 2.0 for native macOS integration&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;3D Rendering&lt;/strong&gt;: Three.js with WebGPU and TSL (Texture Shader Language) for the procedural wood&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Frontend&lt;/strong&gt;: React 18, TypeScript, Tailwind CSS&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Website&lt;/strong&gt;: TanStack Start (SSR), PostgreSQL via Drizzle ORM&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monorepo&lt;/strong&gt;: pnpm workspaces (&lt;code&gt;@cuckoo/app&lt;/code&gt;, &lt;code&gt;@cuckoo/site&lt;/code&gt;, &lt;code&gt;@cuckoo/ui&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Payments&lt;/strong&gt;: Stripe&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Hosting&lt;/strong&gt;: DigitalOcean Spaces for builds and updates&lt;/li&gt;
&lt;/ul&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Logseq MCP</title><link>https://briansunter.com/projects/logseq-mcp</link><guid isPermaLink="true">https://briansunter.com/projects/logseq-mcp</guid><description>An MCP server that hooks Claude into your Logseq graph. Search blocks, draft daily notes, surface TODOs, and run Datalog queries in plain English.</description><pubDate>Fri, 21 Mar 2025 11:09:26 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/logseq-mcp-hero.CUcS_G6A_Z1g1g9M.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;Logseq MCP connects Claude to a running Logseq instance over its HTTP API. Once it’s wired up, Claude can search the graph, read and write blocks, draft daily notes, pull lists of open TODOs, and run Datalog queries. All of this is available from a normal conversation.&lt;/p&gt;
&lt;p&gt;I built it because most of what I do in Logseq follows the same handful of patterns (“what’s still TODO”, “summarise this page”, “stitch these scattered blocks into one outline”), and Claude is faster at those than I am with the keyboard.&lt;/p&gt;
&lt;h2&gt;Features&lt;/h2&gt;
&lt;h3&gt;Knowledge Management&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Search the entire graph&lt;/li&gt;
&lt;li&gt;Summarise pages and block trees&lt;/li&gt;
&lt;li&gt;Create daily notes with predefined sections&lt;/li&gt;
&lt;li&gt;Re-nest flat block lists into a hierarchy&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Task Management&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Pull every block in a given task state (TODO, DOING, etc.)&lt;/li&gt;
&lt;li&gt;Extract action items from meeting notes&lt;/li&gt;
&lt;li&gt;Spin up structured task lists&lt;/li&gt;
&lt;li&gt;Walk task progress over time&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Search &amp;amp; Query&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Plain-language search across the graph&lt;/li&gt;
&lt;li&gt;Block-level content search&lt;/li&gt;
&lt;li&gt;Run advanced Datalog queries&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Content Organization&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Restructure block trees in place&lt;/li&gt;
&lt;li&gt;Group blocks by any criterion you can describe&lt;/li&gt;
&lt;li&gt;Convert flat dumps into nested outlines&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Example Usage&lt;/h2&gt;
&lt;p&gt;Ask Claude:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;“Find all my TODO tasks in Logseq”&lt;/li&gt;
&lt;li&gt;“Create today’s daily note with sections for Tasks, Notes, and Journal”&lt;/li&gt;
&lt;li&gt;“Summarise my Research page”&lt;/li&gt;
&lt;li&gt;“Search my graph for anything about machine learning”&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Installation&lt;/h2&gt;
&lt;p&gt;Enable the Logseq HTTP API, then add the server to your Claude Desktop config:&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;json&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;  &quot;mcpServers&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;    &quot;logseq&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;      &quot;command&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;npx&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;      &quot;args&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: [&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;logseq-mcp&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;      &quot;env&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;        &quot;LOGSEQ_TOKEN&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;your_logseq_token&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;      }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h2&gt;Technology Stack&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;TypeScript MCP server&lt;/li&gt;
&lt;li&gt;Logseq HTTP API&lt;/li&gt;
&lt;li&gt;Cross-platform binaries&lt;/li&gt;
&lt;li&gt;Distributed via npm / &lt;code&gt;bunx&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Pizza Plan</title><link>https://briansunter.com/projects/pizzaplan</link><guid isPermaLink="true">https://briansunter.com/projects/pizzaplan</guid><description>A pizza-dough calculator that works backwards from when you want to eat. Tell it the style, the timing, and the kitchen temperature; it figures out the recipe.</description><pubDate>Sat, 15 Mar 2025 11:00:26 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/pizzaplan-hero.C9eZS2H7_ZhQbF5.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;Pizza Plan is a dough calculator I built because I kept hand-converting hydration percentages and fermentation schedules every time I wanted to make pizza on a Saturday. You pick a style, say when you want to eat, tell it how warm your kitchen is, and it gives you the gram-by-gram recipe and a schedule that fits.&lt;/p&gt;
&lt;h2&gt;Features&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Presets for Neapolitan, New York, Detroit, and a few other styles&lt;/li&gt;
&lt;li&gt;Schedule planner that works back from your eat-by time&lt;/li&gt;
&lt;li&gt;Adjusts hydration and fermentation for kitchen temperature&lt;/li&gt;
&lt;li&gt;Pick the number of pies and ball weight; the totals scale&lt;/li&gt;
&lt;li&gt;Tunable taste sliders (chew, crispness, browning)&lt;/li&gt;
&lt;li&gt;Save and share recipes&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Technology Stack&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;React 18 + TypeScript&lt;/li&gt;
&lt;li&gt;TanStack Router (file-based) and TanStack Query&lt;/li&gt;
&lt;li&gt;Vite&lt;/li&gt;
&lt;li&gt;Tailwind CSS&lt;/li&gt;
&lt;li&gt;Drizzle ORM&lt;/li&gt;
&lt;li&gt;Zod for schema validation&lt;/li&gt;
&lt;/ul&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>SearchThing</title><link>https://briansunter.com/projects/searchthing</link><guid isPermaLink="true">https://briansunter.com/projects/searchthing</guid><description>Semantic search over your own documents, running entirely in the browser. Drop in PDFs, Markdown, or text; embeddings are generated on-device with Transformers.js.</description><pubDate>Wed, 26 Feb 2025 10:00:38 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/searchthing-hero.Gbk0qQRN_1P8LgN.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;SearchThing is a local-first document search tool that runs the entire pipeline (embedding, indexing, querying) inside the browser. Drop in PDFs, Markdown, or plain-text files, and search across them in natural language. Nothing leaves your machine; embeddings are generated on-device via &lt;a href=&quot;https://huggingface.co/docs/transformers.js&quot;&gt;Hugging Face Transformers.js&lt;/a&gt; inside a Web Worker.&lt;/p&gt;
&lt;h2&gt;Features&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Semantic search via on-device embeddings (no API calls, no network round-trip)&lt;/li&gt;
&lt;li&gt;Hybrid BM25 + vector ranking with reciprocal rank fusion&lt;/li&gt;
&lt;li&gt;Upload, store, and browse PDFs, Markdown, and text&lt;/li&gt;
&lt;li&gt;All embedding work happens in a Web Worker so the UI doesn’t stutter&lt;/li&gt;
&lt;li&gt;Caches embeddings per chunk so unchanged content isn’t re-embedded&lt;/li&gt;
&lt;li&gt;Built-in reader view that highlights the chunk that matched your query&lt;/li&gt;
&lt;li&gt;Mobile layout with adaptive navigation&lt;/li&gt;
&lt;li&gt;Drop files anywhere in the window to upload&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Technology Stack&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;TypeScript&lt;/li&gt;
&lt;li&gt;React&lt;/li&gt;
&lt;li&gt;Bun (server and bundler)&lt;/li&gt;
&lt;li&gt;Hugging Face Transformers.js for local embeddings&lt;/li&gt;
&lt;li&gt;shadcn/ui + Tailwind CSS&lt;/li&gt;
&lt;li&gt;Comlink for the main-thread ↔ worker bridge&lt;/li&gt;
&lt;/ul&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Connect Four</title><link>https://briansunter.com/projects/connectfour</link><guid isPermaLink="true">https://briansunter.com/projects/connectfour</guid><description>Real-time multiplayer Connect Four with a 3D board. Create a room, share the link, drop pieces.</description><pubDate>Thu, 13 Feb 2025 04:27:25 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/connectfour-hero.BOUWsesO_Z25nUgc.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;A multiplayer Connect Four game I built to learn React Three Fiber and shore up my real-time stack. Players create rooms, share invite codes, and play head-to-head; the board is rendered in 3D so pieces actually drop into the slots.&lt;/p&gt;
&lt;h2&gt;Features&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Real-time play over WebSockets&lt;/li&gt;
&lt;li&gt;Rooms with shareable invite codes&lt;/li&gt;
&lt;li&gt;3D board rendered with React Three Fiber&lt;/li&gt;
&lt;li&gt;Animated piece drops and win highlight&lt;/li&gt;
&lt;li&gt;Mobile-friendly layout&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Technology Stack&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;React + TypeScript on the frontend&lt;/li&gt;
&lt;li&gt;Socket.io for the game channel&lt;/li&gt;
&lt;li&gt;Express backend with sessions&lt;/li&gt;
&lt;li&gt;PostgreSQL via Drizzle ORM&lt;/li&gt;
&lt;li&gt;Redis for Socket.io scaling across processes&lt;/li&gt;
&lt;li&gt;Docker Compose for deployment&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;How It Works&lt;/h2&gt;
&lt;p&gt;Players join a room with a short code. Game state lives on the server; every move broadcasts to the room over Socket.io and re-renders for both players. The 3D board is the same React Three Fiber scene on both sides, just with mirrored camera positions.&lt;/p&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>ConvoCards Launch Retro</title><link>https://briansunter.com/convocards-launch-retro</link><guid isPermaLink="true">https://briansunter.com/convocards-launch-retro</guid><description>Thoughts and learnings from launching a new app.</description><pubDate>Fri, 22 Nov 2024 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/image.B7028pfG_7znLM.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;p&gt;Last week I launched &lt;a href=&quot;https://convo.cards&quot;&gt;ConvoCards&lt;/a&gt;, a conversation starter card game app. Here’s the story behind it, what I was aiming for, and what I learned along the way.&lt;/p&gt;
&lt;p&gt;I’m really happy with the response. Seeing those first user signups and Stripe payments come in was very exciting. A big thank you to everyone who tried out the app, and especially to those who paid for the premium version!&lt;/p&gt;
&lt;p&gt;While I’ve put out a number of free apps and code before, this is my first time taking something all the way to a “complete” product including a landing page, tutorial, and paid tier.&lt;/p&gt;
&lt;h2&gt;The Idea&lt;/h2&gt;
&lt;p&gt;The idea started with a pack of physical conversation starter cards my partner and I picked up during a California road trip. We had a lot of fun using them on the trip and over dinner, but eventually burned through all 50 questions. I thought it would be a fun idea to make a digital version with way more questions and different themes to choose from.&lt;/p&gt;
&lt;p&gt;I wanted to keep things super simple this time: take the most straightforward idea possible and get it over the finish line. My goals were to make an app that I wanted to play, that others would find useful, and to learn a few new things like Stripe payments and how to make a landing page.&lt;/p&gt;
&lt;h2&gt;Research&lt;/h2&gt;
&lt;p&gt;The first thing I do before starting any project is to research existing solutions. I want to find out: What’s out there? What works? What’s missing? Is this viable? I used the AI app &lt;a href=&quot;https://www.perplexity.ai&quot;&gt;Perplexity&lt;/a&gt; to run a competitor analysis. Previously, manually searching the web and comparing existing products would have been time-consuming, but Perplexity was able to do this really well in a single search. I asked it to compile a list of existing products, their price ranges, estimated popularity, unique features, etc.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Competitor Analysis using Perplexity&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 999px) 999px, 100vw&quot; width=&quot;999&quot; height=&quot;650&quot; src=&quot;https://briansunter.com/_astro/perplexity.BFInL-UZ_1mmK4D.webp&quot; srcset=&quot;https://briansunter.com/_astro/perplexity.BFInL-UZ_ZbPjwg.webp 640w, https://briansunter.com/_astro/perplexity.BFInL-UZ_1uwU5O.webp 750w, https://briansunter.com/_astro/perplexity.BFInL-UZ_1Yn5AY.webp 828w, https://briansunter.com/_astro/perplexity.BFInL-UZ_1mmK4D.webp 999w&quot; /&gt;&lt;figcaption&gt;Competitor Analysis using Perplexity&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The results were promising. There were successful apps out there showing there’s a market, but no single app dominated the space. I had some ideas for additional features as well. Another thing I noticed was that existing products were all mobile apps. I couldn’t find a good web version. While mobile apps have their advantages, I thought a web version you could access on mobile and desktop browsers might be more accessible.&lt;/p&gt;
&lt;h2&gt;Project Management&lt;/h2&gt;
&lt;p&gt;I use &lt;a href=&quot;https://logseq.com&quot;&gt;Logseq&lt;/a&gt; to manage all the tasks and research related to the project. I have a tendency to get off track working on unessential things, so I use Logseq to keep me focused and moving forward. I spent time thinking about each task that needed to be done and wrote them down ahead of time, before starting coding.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;View of every task tagged with &amp;quot;convocards&amp;quot;&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 2934px) 2934px, 100vw&quot; width=&quot;2934&quot; height=&quot;1558&quot; src=&quot;https://briansunter.com/_astro/logseq-db.D1td5kZr_OFKf6.webp&quot; srcset=&quot;https://briansunter.com/_astro/logseq-db.D1td5kZr_ZYbPp3.webp 640w, https://briansunter.com/_astro/logseq-db.D1td5kZr_1Bk8wV.webp 750w, https://briansunter.com/_astro/logseq-db.D1td5kZr_Z2uiQJI.webp 828w, https://briansunter.com/_astro/logseq-db.D1td5kZr_Z2jfGm1.webp 1080w, https://briansunter.com/_astro/logseq-db.D1td5kZr_ZQqopv.webp 1280w, https://briansunter.com/_astro/logseq-db.D1td5kZr_ZDaU4n.webp 1668w, https://briansunter.com/_astro/logseq-db.D1td5kZr_Z2wFkjS.webp 2048w, https://briansunter.com/_astro/logseq-db.D1td5kZr_1jSbmb.webp 2560w, https://briansunter.com/_astro/logseq-db.D1td5kZr_OFKf6.webp 2934w&quot; /&gt;&lt;figcaption&gt;View of every task tagged with &quot;convocards&quot;&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;I’m using the new Logseq DB version which has a more powerful system for tagging data in your notes. I used the outliner on the daily journal to write down tasks, research, and timestamped logs of what I was doing.&lt;/p&gt;
&lt;p&gt;The new Logseq DB features allow me to collect all the tasks related to project throughout my notes in one place. I really like this feature because I’m often researching, brainstorming, and writing down ideas in the daily notes view and I like to maintain a lot of context about where the idea came from, and still manage all the related tasks in one place.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;View of worklog, tasks, and research on my daily notes page&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 2266px) 2266px, 100vw&quot; width=&quot;2266&quot; height=&quot;1118&quot; src=&quot;https://briansunter.com/_astro/logseq-daily.Da6p8ozE_Z1ATXU2.webp&quot; srcset=&quot;https://briansunter.com/_astro/logseq-daily.Da6p8ozE_2swM5b.webp 640w, https://briansunter.com/_astro/logseq-daily.Da6p8ozE_22phXl.webp 750w, https://briansunter.com/_astro/logseq-daily.Da6p8ozE_Z1su806.webp 828w, https://briansunter.com/_astro/logseq-daily.Da6p8ozE_27fJFi.webp 1080w, https://briansunter.com/_astro/logseq-daily.Da6p8ozE_1yhf0v.webp 1280w, https://briansunter.com/_astro/logseq-daily.Da6p8ozE_Z2mIMPF.webp 1668w, https://briansunter.com/_astro/logseq-daily.Da6p8ozE_I59pL.webp 2048w, https://briansunter.com/_astro/logseq-daily.Da6p8ozE_Z1ATXU2.webp 2266w&quot; /&gt;&lt;figcaption&gt;View of worklog, tasks, and research on my daily notes page&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2&gt;Building&lt;/h2&gt;
&lt;h3&gt;Next.js&lt;/h3&gt;
&lt;figure&gt;&lt;img alt=&quot;nextjs&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 846px) 846px, 100vw&quot; width=&quot;846&quot; height=&quot;390&quot; src=&quot;https://briansunter.com/_astro/nextjs.CDeQQSOv_Z1Yip96.webp&quot; srcset=&quot;https://briansunter.com/_astro/nextjs.CDeQQSOv_21Cf3C.webp 640w, https://briansunter.com/_astro/nextjs.CDeQQSOv_ZiKzkl.webp 750w, https://briansunter.com/_astro/nextjs.CDeQQSOv_vHHUn.webp 828w, https://briansunter.com/_astro/nextjs.CDeQQSOv_Z1Yip96.webp 846w&quot; /&gt;&lt;figcaption&gt;nextjs&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Next.js is a web framework that makes it easier to build frontend apps with server side logic, like loading and updating data.
I like the framework a lot but hadn’t used for anything this interactive before. I ran into some weirdness with Next.js, like figuring out what to do client side vs server side, cache revalidation, when to use form actions vs client side server actions, and handling updates mid animation. But overall it simplified many things, like handling database updates through server actions and setting up Stripe webhook endpoints.&lt;/p&gt;
&lt;p&gt;I used the &lt;a href=&quot;https://next-auth.js.org&quot;&gt;NextAuth&lt;/a&gt; library to handle authentication with Google OAuth.&lt;/p&gt;
&lt;p&gt;This integrates nicely with Next.js and makes it easy to check if the user is logged in, redirect them if not, and fetch their data.&lt;/p&gt;
&lt;p&gt;I used &lt;a href=&quot;https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions&quot;&gt;server actions&lt;/a&gt; to update data, such as marking a card as a favorite.&lt;/p&gt;
&lt;p&gt;Here’s an example of rendering a page, checking if the user is logged in, and fetching the database for the logged-in user’s favorites.&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;tsx&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;export&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; default&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; async&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; function&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; FavoritesList&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;() {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;  // Get the authenticated session&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;  const&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; session&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; await&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; getServerSession&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(authOptions);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;  // Redirect if not logged in&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;  if&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;!&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;session?.user?.id) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;    redirect&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;/login&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;  // Fetch favorites for the current user&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;  const&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; favorites&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; await&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; prisma.favorite.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;findMany&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;({&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    where: {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;      userId: session.user.id,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    include: {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;      card: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    orderBy: {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;      createdAt: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;desc&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  });&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;  return&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    &amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;div&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; className&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;max-w-2xl mx-auto p-6&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;      &amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;h1&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; className&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;text-2xl font-bold mb-6&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&amp;gt;Your Recent Favorites&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;h1&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;      {favorites.&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;length&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; ===&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 0&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; ?&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;        &amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;p&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; className&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;text-gray-500&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&amp;gt;You haven&apos;t favorited any cards yet.&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;p&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;      ) &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;        &amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;div&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; className&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;space-y-4&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;          {favorites.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;map&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;((&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;favorite&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;            &amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;div&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; key&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;{favorite.id} &lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;className&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;border rounded-lg p-4 hover:bg-gray-50&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;              &amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;h2&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; className&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;font-medium&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&amp;gt;{favorite.card.question}&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;h2&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;              &amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;p&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; className&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;text-sm text-gray-500&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;                Favorited on {&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; Date&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(favorite.createdAt).&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;toLocaleDateString&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;()}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;              &amp;lt;/&lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;p&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;            &amp;lt;/&lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;div&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;          ))}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;        &amp;lt;/&lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;div&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;      )}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    &amp;lt;/&lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;div&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  );&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3&gt;Tailwind&lt;/h3&gt;
&lt;p&gt;Tailwind is a CSS framework that simplifies styling web apps. I used it for the layout and styling in all my projects.&lt;/p&gt;
&lt;p&gt;I’ve written CSS using many different styles, but I like &lt;a href=&quot;https://tailwindcss.com/&quot;&gt;Tailwind&lt;/a&gt; the most for its ease of use and modularity. Sometimes it gets verbose, but it helps me avoid pitfalls that come from plain CSS.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Tailwind CSS Styling&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1029px) 1029px, 100vw&quot; width=&quot;1029&quot; height=&quot;719&quot; src=&quot;https://briansunter.com/_astro/packs.DPAYOpa6_1fq8av.webp&quot; srcset=&quot;https://briansunter.com/_astro/packs.DPAYOpa6_1cnM0r.webp 640w, https://briansunter.com/_astro/packs.DPAYOpa6_Z1dTcQY.webp 750w, https://briansunter.com/_astro/packs.DPAYOpa6_1hamLa.webp 828w, https://briansunter.com/_astro/packs.DPAYOpa6_1fq8av.webp 1029w&quot; /&gt;&lt;figcaption&gt;Tailwind CSS Styling&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h3&gt;Framer Motion&lt;/h3&gt;
&lt;p&gt;For animations, I used the &lt;a href=&quot;https://motion.dev&quot;&gt;Framer Motion&lt;/a&gt; library in React. After trying out a bunch of different libraries, Framer seems most powerful and easy to use.&lt;/p&gt;
&lt;p&gt;I haven’t done much with web animations before, but Framer made it straightforward and fun. I’m excited to dig deeper and see what other cool stuff I can make with it.&lt;/p&gt;
&lt;p&gt;Here’s how you would make an animated arrow bounce back and forth.&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;tsx&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;motion.div&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; animate&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;{{ x: [&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;10&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;] }} &lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;transition&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;{{ repeat: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;Infinity&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, duration: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;1.5&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; }}&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  &amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;ArrowRight&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; className&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;mx-auto opacity-80&quot;&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; size&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;48&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;} /&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;motion.div&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3&gt;Prisma&lt;/h3&gt;
&lt;p&gt;I use &lt;a href=&quot;https://www.prisma.io&quot;&gt;Prisma&lt;/a&gt; along with Postgres to handle database operations.
Prisma has some quirks, but it’s my favorite ORM overall. The queries are flexible, type-safe, and it auto-generates migration files when you update your schema. These migrations are really helpful when moving fast with data model changes. Not all ORMs can handle this. On the downside, it has suboptimal performance for some relational queries, but there’s a &lt;a href=&quot;https://github.com/prisma/prisma/discussions/22288&quot;&gt;feature in beta&lt;/a&gt; to improve this.&lt;/p&gt;
&lt;p&gt;I considered DynamoDB and some Cloudflare data solutions as well, but decided to stick with open-source tech to avoid getting locked into any particular vendor.&lt;/p&gt;
&lt;p&gt;Here’s an example of the Prisma schema for cards and packs. This is all you need to generate the database tables, types, client, and migrations.&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;prisma&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;model&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; Pack&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  id          &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;String&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;   @id&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; @default&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;cuid&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;())&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  name        &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;String&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  description &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;String&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  packType    &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;PackType&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; @default&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;FREE&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  icon        &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;String&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;   @default&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;💰&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  color       &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;String&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;   @default&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;#&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;000000&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  bgColor     &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;String&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;   @default&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;#&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;ffffff&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  cards       &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;Card&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;[]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  users       &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;User&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;[]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;model&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; Card&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  id        &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;String&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;     @id&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; @default&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;cuid&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;())&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  question  &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;String&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  packId    &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;String&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  pack      &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;Pack&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;       @relation&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;fields&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: [&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;packId&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;], &lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;references&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: [&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;])&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  favorites &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;Favorite&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;[]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  seenBy    &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;SeenCard&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;[]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Fetching a pack with its cards:&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;ts&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; pack&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; await&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; prisma.pack.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;findUnique&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;({&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  where: { id: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;123&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  include: {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    cards: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;});&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3&gt;Stripe&lt;/h3&gt;
&lt;p&gt;This was my first time using Stripe Checkout. Getting everything set up (subscriptions, cancellations, resubscriptions, expiration handling, and testing in dev and prod) took some work but wasn’t too bad.&lt;/p&gt;
&lt;p&gt;Stripe gives you good &lt;a href=&quot;https://docs.stripe.com/test-mode&quot;&gt;local testing tools&lt;/a&gt; where you can simulate payment events like new subscriptions and expirations on your local machine.&lt;/p&gt;
&lt;p&gt;The basic flow for a Stripe subscription is this:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The user visits your checkout page which has a Stripe “price id” associated with a product.&lt;/li&gt;
&lt;li&gt;When the user clicks the upgrade button, your API requests a checkout session from Stripe using the price ID.&lt;/li&gt;
&lt;li&gt;You use the URL from the response to redirect the user to Stripe’s checkout page for payment details.&lt;/li&gt;
&lt;li&gt;After successful payment, Stripe pings your webhook, notifying you of the transaction and your API updates the user’s subscription status to active.&lt;/li&gt;
&lt;li&gt;When your API successfully handles the webhook, Stripe redirects the user back to your signup success page.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;StripeServerWebsiteUserStripeServerWebsiteUserClick Upgrade ButtonRequest checkout session with price IDCreate checkout sessionReturn session ID &amp;amp; URLReturn checkout URLRedirect to Stripe checkoutComplete payment formProcess paymentSend webhook (customer.subscription.created)Update subscription statusRedirect to success URL&lt;/p&gt;
&lt;h2&gt;Zod&lt;/h2&gt;
&lt;p&gt;I used &lt;a href=&quot;https://zod.dev&quot;&gt;Zod&lt;/a&gt; to validate that incoming data is in the expected format. You write a schema describing the expected data, and Zod will check that the incoming data matches the schema. The schema has the same shape as the data, so it’s easy to see what format is expected. It is powerful because it’s able to do runtime type checking, as well as generating compile time types for TypeScript.&lt;/p&gt;
&lt;p&gt;Here’s an example of a schema for validating a Stripe webhook event.&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;ts&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; subscriptionObjectSchema&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; z.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;object&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;({&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  id: z.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(),&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  status: z.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;enum&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;([&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;    &quot;trialing&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;    &quot;active&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;    &quot;incomplete&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;    &quot;incomplete_expired&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;    &quot;past_due&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;    &quot;canceled&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;    &quot;unpaid&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;    &quot;paused&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  ]),&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  customer: z.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(),&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  cancel_at_period_end: z.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;boolean&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(),&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  current_period_start: z.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;number&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(),&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  current_period_end: z.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;number&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(),&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  created: z.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;number&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(),&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;});&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3&gt;Next Admin&lt;/h3&gt;
&lt;p&gt;One feature I really like from the Django web framework is its built-in admin panel for easy data updates.&lt;/p&gt;
&lt;p&gt;I found a similar project called “Next Admin” that brings that same idea to Next.js and Prisma. It automatically creates admin pages for your database resources so you can easily manage them with a nice UI.&lt;/p&gt;
&lt;p&gt;I had to deal with a few tricky upgrades since the project is new and evolving quickly, but overall I really like it.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Managing cards with Next Admin&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1645px) 1645px, 100vw&quot; width=&quot;1645&quot; height=&quot;920&quot; src=&quot;https://briansunter.com/_astro/next-admin.Cm1ktOR3_2sP5TJ.webp&quot; srcset=&quot;https://briansunter.com/_astro/next-admin.Cm1ktOR3_Z1GCOtP.webp 640w, https://briansunter.com/_astro/next-admin.Cm1ktOR3_Z1Xf2HB.webp 750w, https://briansunter.com/_astro/next-admin.Cm1ktOR3_Z282Qy.webp 828w, https://briansunter.com/_astro/next-admin.Cm1ktOR3_IwhR.webp 1080w, https://briansunter.com/_astro/next-admin.Cm1ktOR3_1dBrmK.webp 1280w, https://briansunter.com/_astro/next-admin.Cm1ktOR3_2sP5TJ.webp 1645w&quot; /&gt;&lt;figcaption&gt;Managing cards with Next Admin&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h3&gt;Cursor&lt;/h3&gt;
&lt;p&gt;My favorite coding tool is &lt;a href=&quot;https://cursor.sh&quot;&gt;Cursor&lt;/a&gt;, which is a code editor with AI integration. It has an AI assistant in the sidebar that can write code and answer questions about code. I’ve been using it for almost two years, and it continues to get better with the newer AI models and new UI features.&lt;/p&gt;
&lt;p&gt;It’s able to automate quite a bit of coding but still has limitations. If you can describe what you need to do in great detail and include extra context like official documentation, it works really well. It also works great for refactoring code across many different files. It still doesn’t work as well for completely coding features from scratch. I think the key to effectively using AI for coding is having an intuitive sense of the types of tasks it can do well and those it can’t.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Writing code using AI with Cursor&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 3582px) 3582px, 100vw&quot; width=&quot;3582&quot; height=&quot;2107&quot; src=&quot;https://briansunter.com/_astro/cursor.Bn-89ulo_Z1OdG4r.webp&quot; srcset=&quot;https://briansunter.com/_astro/cursor.Bn-89ulo_ZW10HN.webp 640w, https://briansunter.com/_astro/cursor.Bn-89ulo_ZseSGC.webp 750w, https://briansunter.com/_astro/cursor.Bn-89ulo_13AEnD.webp 828w, https://briansunter.com/_astro/cursor.Bn-89ulo_ZH10GK.webp 1080w, https://briansunter.com/_astro/cursor.Bn-89ulo_1z9swI.webp 1280w, https://briansunter.com/_astro/cursor.Bn-89ulo_Z36OAj.webp 1668w, https://briansunter.com/_astro/cursor.Bn-89ulo_ZEs4lG.webp 2048w, https://briansunter.com/_astro/cursor.Bn-89ulo_ZnO1CQ.webp 2560w, https://briansunter.com/_astro/cursor.Bn-89ulo_Z1OdG4r.webp 3582w&quot; /&gt;&lt;figcaption&gt;Writing code using AI with Cursor&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2&gt;Launch&lt;/h2&gt;
&lt;h3&gt;Product Hunt&lt;/h3&gt;
&lt;figure&gt;&lt;img alt=&quot;Product Hunt launch page for ConvoCards&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 2658px) 2658px, 100vw&quot; width=&quot;2658&quot; height=&quot;1962&quot; src=&quot;https://briansunter.com/_astro/producthunt.DkHOh-Q-_26QUqg.webp&quot; srcset=&quot;https://briansunter.com/_astro/producthunt.DkHOh-Q-_2nDtHm.webp 640w, https://briansunter.com/_astro/producthunt.DkHOh-Q-_1UHkCr.webp 750w, https://briansunter.com/_astro/producthunt.DkHOh-Q-_Z1QfEp.webp 828w, https://briansunter.com/_astro/producthunt.DkHOh-Q-_Z2gigun.webp 1080w, https://briansunter.com/_astro/producthunt.DkHOh-Q-_1UKsN2.webp 1280w, https://briansunter.com/_astro/producthunt.DkHOh-Q-_Z1fVv5m.webp 1668w, https://briansunter.com/_astro/producthunt.DkHOh-Q-_Z1JmbWp.webp 2048w, https://briansunter.com/_astro/producthunt.DkHOh-Q-_Z1DpmXY.webp 2560w, https://briansunter.com/_astro/producthunt.DkHOh-Q-_26QUqg.webp 2658w&quot; /&gt;&lt;figcaption&gt;Product Hunt launch page for ConvoCards&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Launching on Product Hunt was definitely a learning experience. I wasn’t quite prepared for how much prep work goes into a successful launch these days.&lt;/p&gt;
&lt;p&gt;Looking at the top products on Product Hunt, they all had well-produced videos and marked-up screenshots. It seems like having a great video is almost required to get attention on Product Hunt and Twitter now.&lt;/p&gt;
&lt;p&gt;I ended up with 24 upvotes, which put me somewhere in the middle of the pack. There’s a big split between the top-voted “featured” products and “all” products. Featured ones get way more visibility on the site’s home page.&lt;/p&gt;
&lt;p&gt;The first few hours matter a lot since they hide the vote counts. That’s when you need to break into featured to get significant traffic. All the guides say to launch at midnight PST to maximize the time users have to vote.&lt;/p&gt;
&lt;p&gt;Marc Lou has this great guide on Product Hunt launches: &lt;a href=&quot;https://marclou.beehiiv.com/p/how-to-launch-a-startup-on-product-hunt&quot;&gt;How to Launch a Startup on Product Hunt&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;Twitter&lt;/h3&gt;
&lt;p&gt;I posted the Product Hunt link on Twitter but didn’t see much action. Including a link in your Twitter post causes the algorithm to reduce visibility.&lt;/p&gt;

  &lt;div class=&quot;not-prose tweet-embed&quot;&gt;
    &lt;div class=&quot;tweet-card&quot;&gt;
      &lt;a href=&quot;https://twitter.com/Bsunter/status/1855886584282771943&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;&lt;/a&gt;
      &lt;div class=&quot;tweet-header&quot;&gt;
        &lt;div class=&quot;tweet-author&quot;&gt;
          &lt;img src=&quot;https://pbs.twimg.com/profile_images/507230915458646016/POGcr0En_normal.jpeg&quot; alt=&quot;Brian Sunter&apos;s avatar&quot; /&gt;
          &lt;div class=&quot;tweet-author-info&quot;&gt;
            &lt;a href=&quot;https://twitter.com/Bsunter/status/1855886584282771943&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
              &lt;div class=&quot;tweet-author-name-row&quot;&gt;
                &lt;span class=&quot;tweet-author-name&quot;&gt;Brian Sunter&lt;/span&gt;
                

  


              &lt;/div&gt;
            &lt;/a&gt;
            &lt;span class=&quot;tweet-author-handle&quot;&gt;@Bsunter&lt;/span&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;a href=&quot;https://twitter.com/Bsunter/status/1855886584282771943&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;

  
    
  

&lt;/a&gt;
      &lt;/div&gt;
      
      &lt;div class=&quot;tweet-body&quot;&gt;I&apos;m launching a new app! ConvoCards

It&apos;s a conversation starter card game.

Check it out on product hunt now and upvote if you like it!
&lt;a href=&quot;https://www.producthunt.com/posts/convocards&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;producthunt.com/posts/convocar…&lt;/a&gt;

Here&apos;s how it works:
- Choose a theme like &quot;Couples&quot; or &quot;Favorites&quot;
- Tap to reveal thought-provoking questions
- Take&lt;/div&gt;
      Show more
      
      &lt;a href=&quot;https://twitter.com/Bsunter/status/1855886584282771943&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
        &lt;span class=&quot;tweet-timestamp&quot;&gt;Nov 11, 2024, 8:13 AM&lt;/span&gt;
      &lt;/a&gt;
      &lt;hr /&gt;
      &lt;div class=&quot;tweet-actions&quot;&gt;
        &lt;div class=&quot;tweet-action tweet-action-like&quot;&gt;
          

  
    
  


          &lt;span&gt;5&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class=&quot;tweet-action tweet-action-reply&quot;&gt;
          

  
    
  


          &lt;span&gt;0&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  
&lt;p&gt;Next time I need to follow Marc Lou’s approach. He includes these great explainer videos with his posts. It seems like video is really essential to get noticed these days.&lt;/p&gt;

  &lt;div class=&quot;not-prose tweet-embed&quot;&gt;
    &lt;div class=&quot;tweet-card&quot;&gt;
      &lt;a href=&quot;https://twitter.com/marclou/status/1791545291377906077&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;&lt;/a&gt;
      &lt;div class=&quot;tweet-header&quot;&gt;
        &lt;div class=&quot;tweet-author&quot;&gt;
          &lt;img src=&quot;https://pbs.twimg.com/profile_images/1514863683574599681/9k7PqDTA_normal.jpg&quot; alt=&quot;Marc Lou&apos;s avatar&quot; /&gt;
          &lt;div class=&quot;tweet-author-info&quot;&gt;
            &lt;a href=&quot;https://twitter.com/marclou/status/1791545291377906077&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
              &lt;div class=&quot;tweet-author-name-row&quot;&gt;
                &lt;span class=&quot;tweet-author-name&quot;&gt;Marc Lou&lt;/span&gt;
                

  


              &lt;/div&gt;
            &lt;/a&gt;
            &lt;span class=&quot;tweet-author-handle&quot;&gt;@marclou&lt;/span&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;a href=&quot;https://twitter.com/marclou/status/1791545291377906077&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;

  
    
  

&lt;/a&gt;
      &lt;/div&gt;
      
      &lt;div class=&quot;tweet-body&quot;&gt;I&apos;m launching a free Canny alternative because:

1. Canny has too many features for solo makers
2. $99/month for more than 1 product...

It&apos;s called Insighto and it&apos;s live on Product Hunt now! &lt;a href=&quot;https://www.producthunt.com/products/insighto&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;producthunt.com/products/insig…&lt;/a&gt; https://t.co/XghqUYTT7t&lt;/div&gt;
      
      
    &lt;div class=&quot;tweet-video-container&quot;&gt;
      &lt;video controls preload=&quot;metadata&quot; poster=&quot;https://pbs.twimg.com/ext_tw_video_thumb/1791545226873679872/pu/img/qqTFjNAuBgtdujn1.jpg&quot;&gt;
        &lt;source src=&quot;https://video.twimg.com/ext_tw_video/1791545226873679872/pu/vid/avc1/1280x720/Q8ScJzPKFvA8Z9R2.mp4?tag=12&quot; type=&quot;video/mp4&quot;&gt;&lt;/source&gt;
        Your browser does not support the video tag.
      &lt;/video&gt;
      &lt;a href=&quot;https://twitter.com/marclou/status/1791545291377906077&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
        &lt;span class=&quot;tweet-video-fallback-text&quot;&gt;Click to watch on X&lt;/span&gt;
      &lt;/a&gt;
    &lt;/div&gt;
      &lt;a href=&quot;https://twitter.com/marclou/status/1791545291377906077&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
        &lt;span class=&quot;tweet-timestamp&quot;&gt;May 17, 2024, 7:04 PM&lt;/span&gt;
      &lt;/a&gt;
      &lt;hr /&gt;
      &lt;div class=&quot;tweet-actions&quot;&gt;
        &lt;div class=&quot;tweet-action tweet-action-like&quot;&gt;
          

  
    
  


          &lt;span&gt;616&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class=&quot;tweet-action tweet-action-reply&quot;&gt;
          

  
    
  


          &lt;span&gt;73&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  
&lt;h3&gt;Substack&lt;/h3&gt;
&lt;p&gt;The &lt;a href=&quot;https://newsletter.briansunter.com/p/im-launching-a-new-app-convocards&quot;&gt;announcement on my Substack&lt;/a&gt; did pretty well. The newsletter has about 600 subscribers with a 38% open rate. The newsletter’s not huge yet, but it has some of my most engaged followers.&lt;/p&gt;
&lt;h3&gt;Hacker News&lt;/h3&gt;
&lt;p&gt;Most of my traffic actually came from Hacker News. In the past, I’ve hit the front page before with several hundred points and gotten massive traffic spikes.&lt;/p&gt;
&lt;p&gt;This time I posted on “Show HN”. I only got 8 upvotes but still got more traffic than Product Hunt.&lt;/p&gt;
&lt;p&gt;HN is super unpredictable, but since I’ve had some surprise hits before, I’ll keep posting new stuff there.&lt;/p&gt;
&lt;h3&gt;Reddit&lt;/h3&gt;
&lt;p&gt;I didn’t get much love on Reddit, but saw some traffic. Reddit’s probably the toughest place to promote paid apps or do self-promotion. It might work better if you’re already active in specific communities, but as someone who’s not on Reddit much, it’s an uphill battle.&lt;/p&gt;
&lt;h2&gt;Google Analytics&lt;/h2&gt;
&lt;p&gt;Here’s a snapshot of the traffic since launch, about 500 visitors total. Likely the number is a bit higher since many people are using adblockers which limit the number of users Google Analytics can count.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Google Analytics since launch&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1434px) 1434px, 100vw&quot; width=&quot;1434&quot; height=&quot;802&quot; src=&quot;https://briansunter.com/_astro/analytics.BTFd_JSV_21cLGf.webp&quot; srcset=&quot;https://briansunter.com/_astro/analytics.BTFd_JSV_Z2m0FHL.webp 640w, https://briansunter.com/_astro/analytics.BTFd_JSV_2hCddM.webp 750w, https://briansunter.com/_astro/analytics.BTFd_JSV_Zua9of.webp 828w, https://briansunter.com/_astro/analytics.BTFd_JSV_Z26a8qy.webp 1080w, https://briansunter.com/_astro/analytics.BTFd_JSV_2qmURT.webp 1280w, https://briansunter.com/_astro/analytics.BTFd_JSV_21cLGf.webp 1434w&quot; /&gt;&lt;figcaption&gt;Google Analytics since launch&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2&gt;Looking Forward&lt;/h2&gt;
&lt;p&gt;This launch taught me a ton about what goes into shipping a complete product. While some marketing channels were hits and others were misses, each one gave me insights I’ll use for future launches. I’m excited to keep improving ConvoCards while applying these lessons to new projects.&lt;/p&gt;
&lt;p&gt;Check out the app at &lt;a href=&quot;https://convo.cards&quot;&gt;convo.cards&lt;/a&gt;&lt;/p&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator><category>blog</category></item><item><title>Typst Business Card Templates</title><link>https://briansunter.com/projects/typst-business-cards</link><guid isPermaLink="true">https://briansunter.com/projects/typst-business-cards</guid><description>A collection of professionally-designed business card templates built with Typst, featuring multiple styles from minimalist to luxury.</description><pubDate>Mon, 18 Nov 2024 04:22:08 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/typst-business-cards-hero.ETea5sNY_1wjFLs.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;A collection of seven professionally-designed business card templates built with &lt;a href=&quot;https://typst.app/&quot;&gt;Typst&lt;/a&gt;. Each template features distinct typography, spacing, and visual hierarchy to cover a range of styles and use cases.&lt;/p&gt;
&lt;h2&gt;Templates&lt;/h2&gt;
&lt;h3&gt;Full Circle&lt;/h3&gt;
&lt;p&gt;Modern design with a striking circular monogram accent.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Full Circle business card template&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1050px) 1050px, 100vw&quot; width=&quot;1050&quot; height=&quot;600&quot; src=&quot;https://briansunter.com/_astro/typst-card-full-circle.DnatezZ1_Z1UkVEi.webp&quot; srcset=&quot;https://briansunter.com/_astro/typst-card-full-circle.DnatezZ1_Zg1Gvt.webp 640w, https://briansunter.com/_astro/typst-card-full-circle.DnatezZ1_l8rR8.webp 750w, https://briansunter.com/_astro/typst-card-full-circle.DnatezZ1_Z1aNzd0.webp 828w, https://briansunter.com/_astro/typst-card-full-circle.DnatezZ1_Z1UkVEi.webp 1050w&quot; /&gt;&lt;figcaption&gt;Full Circle business card template&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h3&gt;Refine&lt;/h3&gt;
&lt;p&gt;Elegant minimalist card with premium Baskerville typography.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Refine business card template&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1050px) 1050px, 100vw&quot; width=&quot;1050&quot; height=&quot;600&quot; src=&quot;https://briansunter.com/_astro/typst-card-refine.Ba_jBvwp_2jHjt9.webp&quot; srcset=&quot;https://briansunter.com/_astro/typst-card-refine.Ba_jBvwp_Zatxgm.webp 640w, https://briansunter.com/_astro/typst-card-refine.Ba_jBvwp_2c2mqm.webp 750w, https://briansunter.com/_astro/typst-card-refine.Ba_jBvwp_Z19WSSR.webp 828w, https://briansunter.com/_astro/typst-card-refine.Ba_jBvwp_2jHjt9.webp 1050w&quot; /&gt;&lt;figcaption&gt;Refine business card template&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h3&gt;Simple Modern&lt;/h3&gt;
&lt;p&gt;Clean, crisp layout with contemporary sans-serif type.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Simple Modern business card template&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1050px) 1050px, 100vw&quot; width=&quot;1050&quot; height=&quot;600&quot; src=&quot;https://briansunter.com/_astro/typst-card-simple-modern.CzS1C0T9_ZLBBJ.webp&quot; srcset=&quot;https://briansunter.com/_astro/typst-card-simple-modern.CzS1C0T9_Z1eOPoB.webp 640w, https://briansunter.com/_astro/typst-card-simple-modern.CzS1C0T9_D4ndE.webp 750w, https://briansunter.com/_astro/typst-card-simple-modern.CzS1C0T9_1GULCe.webp 828w, https://briansunter.com/_astro/typst-card-simple-modern.CzS1C0T9_ZLBBJ.webp 1050w&quot; /&gt;&lt;figcaption&gt;Simple Modern business card template&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h3&gt;Bold Serif&lt;/h3&gt;
&lt;p&gt;Confident design with commanding serif presence.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Bold Serif business card template&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1050px) 1050px, 100vw&quot; width=&quot;1050&quot; height=&quot;600&quot; src=&quot;https://briansunter.com/_astro/typst-card-bold-serif.CMqM0H-z_ZYuDCs.webp&quot; srcset=&quot;https://briansunter.com/_astro/typst-card-bold-serif.CMqM0H-z_2gTB6a.webp 640w, https://briansunter.com/_astro/typst-card-bold-serif.CMqM0H-z_Z1f2fSX.webp 750w, https://briansunter.com/_astro/typst-card-bold-serif.CMqM0H-z_Z2t9OD.webp 828w, https://briansunter.com/_astro/typst-card-bold-serif.CMqM0H-z_ZYuDCs.webp 1050w&quot; /&gt;&lt;figcaption&gt;Bold Serif business card template&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h3&gt;Elegant Serif&lt;/h3&gt;
&lt;p&gt;Sophisticated card with classic proportions and refined readability.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Elegant Serif business card template&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1050px) 1050px, 100vw&quot; width=&quot;1050&quot; height=&quot;600&quot; src=&quot;https://briansunter.com/_astro/typst-card-elegant-serif.asr0dbYJ_Z1oXusk.webp&quot; srcset=&quot;https://briansunter.com/_astro/typst-card-elegant-serif.asr0dbYJ_Z1LAEdo.webp 640w, https://briansunter.com/_astro/typst-card-elegant-serif.asr0dbYJ_6iyoR.webp 750w, https://briansunter.com/_astro/typst-card-elegant-serif.asr0dbYJ_1a9WNr.webp 828w, https://briansunter.com/_astro/typst-card-elegant-serif.asr0dbYJ_Z1oXusk.webp 1050w&quot; /&gt;&lt;figcaption&gt;Elegant Serif business card template&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h3&gt;Big Name&lt;/h3&gt;
&lt;p&gt;Bold layout that puts your name front and center.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Big Name business card template&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1050px) 1050px, 100vw&quot; width=&quot;1050&quot; height=&quot;600&quot; src=&quot;https://briansunter.com/_astro/typst-card-big-name.DhUzGLZO_1yDEug.webp&quot; srcset=&quot;https://briansunter.com/_astro/typst-card-big-name.DhUzGLZO_23K0sU.webp 640w, https://briansunter.com/_astro/typst-card-big-name.DhUzGLZO_1R9HDi.webp 750w, https://briansunter.com/_astro/typst-card-big-name.DhUzGLZO_2d9OeA.webp 828w, https://briansunter.com/_astro/typst-card-big-name.DhUzGLZO_1yDEug.webp 1050w&quot; /&gt;&lt;figcaption&gt;Big Name business card template&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h3&gt;Patrick Bateman&lt;/h3&gt;
&lt;p&gt;Luxury executive card inspired by high-end stationery, a nod to &lt;em&gt;American Psycho&lt;/em&gt;.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Patrick Bateman business card template&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1004px) 1004px, 100vw&quot; width=&quot;1004&quot; height=&quot;650&quot; src=&quot;https://briansunter.com/_astro/typst-card-patrick-bateman.DvPDOtib_2grriq.webp&quot; srcset=&quot;https://briansunter.com/_astro/typst-card-patrick-bateman.DvPDOtib_ZsWqno.webp 640w, https://briansunter.com/_astro/typst-card-patrick-bateman.DvPDOtib_BJ7kN.webp 750w, https://briansunter.com/_astro/typst-card-patrick-bateman.DvPDOtib_1bCglp.webp 828w, https://briansunter.com/_astro/typst-card-patrick-bateman.DvPDOtib_2grriq.webp 1004w&quot; /&gt;&lt;figcaption&gt;Patrick Bateman business card template&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2&gt;Features&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Build automation&lt;/strong&gt; via &lt;code&gt;justfile&lt;/code&gt;: compile to PDF, SVG, and PNG with a single command&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Live preview&lt;/strong&gt; with &lt;code&gt;just watch&lt;/code&gt; for rapid iteration&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Customizable&lt;/strong&gt;: edit colors, fonts, and content directly in Typst source&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;High-res output&lt;/strong&gt;: 300 PPI PNG exports for crisp previews&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Template scaffold&lt;/strong&gt;: &lt;code&gt;just new-template&lt;/code&gt; to create new designs from scratch&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Tech Stack&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Typst&lt;/strong&gt;: modern markup-based typesetting system (successor to LaTeX for document design)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Just&lt;/strong&gt;: command runner for build automation&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;ImageMagick&lt;/strong&gt;: post-processing and format conversion&lt;/li&gt;
&lt;/ul&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Art Gallery</title><link>https://briansunter.com/projects/art</link><guid isPermaLink="true">https://briansunter.com/projects/art</guid><description>A gallery of studies and finished pieces across pen and ink, charcoal, watercolor, graphite, and digital work, organized by series with a full-screen lightbox.</description><pubDate>Fri, 02 Aug 2024 05:21:21 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/art-hero.BfVvHMyP_Z1Kf10j.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;A gallery of my drawings and paintings, grouped into series by medium and theme. Each piece carries its own metadata (medium, surface, dimensions, year), so the gallery doubles as a record of practice over time.&lt;/p&gt;
&lt;h2&gt;Features&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Series organized by medium and theme&lt;/li&gt;
&lt;li&gt;Full-screen lightbox via PhotoSwipe&lt;/li&gt;
&lt;li&gt;Per-piece metadata (medium, surface, dimensions, year)&lt;/li&gt;
&lt;li&gt;Filter by tag and medium&lt;/li&gt;
&lt;li&gt;Grid and list views&lt;/li&gt;
&lt;li&gt;Drafts hidden in production&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Technology Stack&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;YAML files for artwork metadata&lt;/li&gt;
&lt;li&gt;PhotoSwipe for the lightbox&lt;/li&gt;
&lt;li&gt;Astro content collections for type-safe loading&lt;/li&gt;
&lt;li&gt;Tailwind CSS, TypeScript&lt;/li&gt;
&lt;/ul&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Personal Site</title><link>https://briansunter.com/projects/personal-site</link><guid isPermaLink="true">https://briansunter.com/projects/personal-site</guid><description>This site. Astro, MDX, Tailwind v4: blog, projects, recipes, photos, and a pin collection, all built statically.</description><pubDate>Fri, 02 Aug 2024 05:21:21 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/personal-site-hero.CgQx69eK_Z2wyhmb.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;The site you’re on right now. It’s where I keep my blog, projects, &lt;a href=&quot;https://briansunter.com/recipes&quot;&gt;recipes&lt;/a&gt;, &lt;a href=&quot;https://briansunter.com/photos&quot;&gt;photos&lt;/a&gt;, and &lt;a href=&quot;https://briansunter.com/pin-collection&quot;&gt;pin collection&lt;/a&gt;. All of these are generated statically from markdown, MDX, Cooklang, and YAML files in a single Astro project.&lt;/p&gt;
&lt;h2&gt;Features&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;MDX-based blog with KaTeX for math and Shiki for syntax highlighting&lt;/li&gt;
&lt;li&gt;Cooklang-powered recipes that scale to any serving size&lt;/li&gt;
&lt;li&gt;Photo gallery with EXIF data and a Leaflet map of where each shot was taken&lt;/li&gt;
&lt;li&gt;Pagefind full-text search across the whole site&lt;/li&gt;
&lt;li&gt;Dark mode that respects &lt;code&gt;prefers-color-scheme&lt;/code&gt; and remembers your override&lt;/li&gt;
&lt;li&gt;RSS feed&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Technology Stack&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Astro 6&lt;/li&gt;
&lt;li&gt;TypeScript&lt;/li&gt;
&lt;li&gt;Tailwind CSS v4 (configured via CSS, not JS)&lt;/li&gt;
&lt;li&gt;MDX&lt;/li&gt;
&lt;li&gt;Pagefind for search&lt;/li&gt;
&lt;li&gt;Custom remark/rehype plugins for tweets, wiki-links, Logseq quirks, and code-block headers&lt;/li&gt;
&lt;/ul&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Photo Gallery</title><link>https://briansunter.com/projects/photos</link><guid isPermaLink="true">https://briansunter.com/projects/photos</guid><description>My photography portfolio: collections grouped by trip and theme, with EXIF data, GPS pins on a map, and a full-screen lightbox.</description><pubDate>Fri, 02 Aug 2024 05:21:21 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/photos-hero.0iqQmF2R_h9pXC.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;A photography portfolio organized into collections: trips, projects, and themes. Each photo carries its EXIF data and a GPS pin so the gallery doubles as a record of where I’ve been with a camera, not just what I shot.&lt;/p&gt;
&lt;h2&gt;Features&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Collections organized by trip, theme, or project&lt;/li&gt;
&lt;li&gt;Full-screen lightbox via PhotoSwipe&lt;/li&gt;
&lt;li&gt;EXIF readout (camera, lens, exposure)&lt;/li&gt;
&lt;li&gt;Leaflet map for photos with GPS coordinates&lt;/li&gt;
&lt;li&gt;Filter by tag, location, or collection&lt;/li&gt;
&lt;li&gt;Grid and list views&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Technology Stack&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;YAML files for photo metadata&lt;/li&gt;
&lt;li&gt;Leaflet for the map&lt;/li&gt;
&lt;li&gt;PhotoSwipe for the lightbox&lt;/li&gt;
&lt;li&gt;Astro for static generation&lt;/li&gt;
&lt;li&gt;Tailwind CSS, TypeScript&lt;/li&gt;
&lt;/ul&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Pin Collection</title><link>https://briansunter.com/projects/pin-collection</link><guid isPermaLink="true">https://briansunter.com/projects/pin-collection</guid><description>A digital display case for my lapel-pin collection. Each pin is photographed, background-removed, and pinned (sorry) to a velvet-style backdrop with notes on where it came from.</description><pubDate>Fri, 02 Aug 2024 05:21:21 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/pin-collection-map-hero.BmWpjOwj_1uctD5.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;I collect lapel pins from museums, events, friends, and random vending machines, and the box of them was getting unwieldy. So I started photographing each one, running the photos through &lt;a href=&quot;https://github.com/danielgatis/rembg&quot;&gt;rembg&lt;/a&gt; to drop the background, and putting them on this page with notes on the provenance, materials, and where I picked them up.&lt;/p&gt;
&lt;p&gt;It’s a digital version of the felt-board displays you see at pin-trading conventions, with the bonus that I can search and filter without touching the physical pile.&lt;/p&gt;
&lt;h2&gt;Map View&lt;/h2&gt;
&lt;p&gt;The collection also has a map view for pins with known coordinates. It turns the collection into a loose travel diary: brewery pins, museum pins, gifts, national parks, and roadside finds all land back where I picked them up.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Pin collection world map view&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1600px) 1600px, 100vw&quot; width=&quot;1600&quot; height=&quot;832&quot; src=&quot;https://briansunter.com/_astro/pin-collection-map-hero.BmWpjOwj_Z1B5OR1.webp&quot; srcset=&quot;https://briansunter.com/_astro/pin-collection-map-hero.BmWpjOwj_WN9nR.webp 640w, https://briansunter.com/_astro/pin-collection-map-hero.BmWpjOwj_Z1SiyQC.webp 750w, https://briansunter.com/_astro/pin-collection-map-hero.BmWpjOwj_BNba.webp 828w, https://briansunter.com/_astro/pin-collection-map-hero.BmWpjOwj_ZqIOyl.webp 1080w, https://briansunter.com/_astro/pin-collection-map-hero.BmWpjOwj_ZwaFLQ.webp 1280w, https://briansunter.com/_astro/pin-collection-map-hero.BmWpjOwj_Z1B5OR1.webp 1600w&quot; /&gt;&lt;figcaption&gt;Pin collection world map view&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Zooming in keeps the pin artwork front and center while labels appear only where they can fit. The result feels more like browsing a physical display case than scanning a spreadsheet of places.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Pin collection North America map view&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1558px) 1558px, 100vw&quot; width=&quot;1558&quot; height=&quot;1135&quot; src=&quot;https://briansunter.com/_astro/pin-collection-map-north-america.Bb91_D8J_2i7Y2V.webp&quot; srcset=&quot;https://briansunter.com/_astro/pin-collection-map-north-america.Bb91_D8J_Ary6g.webp 640w, https://briansunter.com/_astro/pin-collection-map-north-america.Bb91_D8J_Z12yWVG.webp 750w, https://briansunter.com/_astro/pin-collection-map-north-america.Bb91_D8J_Z22NFCA.webp 828w, https://briansunter.com/_astro/pin-collection-map-north-america.Bb91_D8J_Zve2kH.webp 1080w, https://briansunter.com/_astro/pin-collection-map-north-america.Bb91_D8J_13NSHg.webp 1280w, https://briansunter.com/_astro/pin-collection-map-north-america.Bb91_D8J_2i7Y2V.webp 1558w&quot; /&gt;&lt;figcaption&gt;Pin collection North America map view&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2&gt;Features&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Felt-style backdrop with each pin floating on a soft drop shadow&lt;/li&gt;
&lt;li&gt;Click for a detail modal with full metadata and prev/next nav&lt;/li&gt;
&lt;li&gt;Map view for pins with known coordinates&lt;/li&gt;
&lt;li&gt;Cluster-aware map labels and thumbnail markers&lt;/li&gt;
&lt;li&gt;Background-removal pipeline using Python’s &lt;code&gt;rembg&lt;/code&gt; with the BiRefNet model&lt;/li&gt;
&lt;li&gt;Filter by category, material, tag, or favorite&lt;/li&gt;
&lt;li&gt;Sort by acquisition date, name, or category&lt;/li&gt;
&lt;li&gt;Horizontal timeline of when each pin entered the collection&lt;/li&gt;
&lt;li&gt;Stats (top categories, year-over-year additions, top tags)&lt;/li&gt;
&lt;li&gt;Keyboard navigation; deep links via hash routing&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Technology Stack&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;YAML files for pin metadata&lt;/li&gt;
&lt;li&gt;Python &lt;code&gt;rembg&lt;/code&gt; (BiRefNet model) for background removal&lt;/li&gt;
&lt;li&gt;Astro for static generation&lt;/li&gt;
&lt;li&gt;Leaflet for the interactive map view&lt;/li&gt;
&lt;li&gt;Tailwind CSS, TypeScript&lt;/li&gt;
&lt;/ul&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Recipe Collection</title><link>https://briansunter.com/projects/recipes</link><guid isPermaLink="true">https://briansunter.com/projects/recipes</guid><description>My recipes, written in Cooklang and rendered with a custom Astro integration. Ingredients scale, steps are linked, and everything is plain text on disk.</description><pubDate>Fri, 02 Aug 2024 05:21:21 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/recipes-hero.B_5aYGnT_1mAh4O.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;The recipes I cook regularly, written in &lt;a href=&quot;https://cooklang.org/&quot;&gt;Cooklang&lt;/a&gt;. It’s a plain-text markup where ingredients, cookware, and timers are inlined with the steps. I built a small Astro integration that parses the &lt;code&gt;.cook&lt;/code&gt; files at build time so the site can render them, scale ingredients to any serving size, and let me search by ingredient.&lt;/p&gt;
&lt;p&gt;Cooklang means each recipe is a single text file I can edit anywhere, version in git, and parse with &lt;a href=&quot;https://briansunter.com/projects/cooklang-parser&quot;&gt;my Cooklang TypeScript parser&lt;/a&gt;. No proprietary recipe schema gets between me and dinner.&lt;/p&gt;
&lt;h2&gt;Features&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Plain-text Cooklang source (one &lt;code&gt;.cook&lt;/code&gt; file per recipe)&lt;/li&gt;
&lt;li&gt;Ingredient scaling to any serving count&lt;/li&gt;
&lt;li&gt;Filter by cuisine, dietary tag, or meal&lt;/li&gt;
&lt;li&gt;Search by ingredient or name&lt;/li&gt;
&lt;li&gt;Print-friendly layout&lt;/li&gt;
&lt;li&gt;Typography tuned for reading at arm’s length on a kitchen counter&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Technology Stack&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Cooklang for the source format&lt;/li&gt;
&lt;li&gt;A custom Astro integration that parses &lt;code&gt;.cook&lt;/code&gt; at build time&lt;/li&gt;
&lt;li&gt;TypeScript&lt;/li&gt;
&lt;li&gt;Tailwind CSS&lt;/li&gt;
&lt;/ul&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Convo Cards</title><link>https://briansunter.com/projects/convocards</link><guid isPermaLink="true">https://briansunter.com/projects/convocards</guid><description>Conversation-starter cards for dinners, parties, and road trips. Swipe through prompts the way you&apos;d shuffle a real deck.</description><pubDate>Thu, 25 Jul 2024 09:12:01 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/convocards-hero.LuDmSq0W_DWOTQ.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;A web app version of the deck-of-question-cards format you’ve seen at dinner parties. Swipe to draw the next prompt, save the ones you like, and buy themed packs if you want more. It’s useful for getting past small talk without it feeling forced.&lt;/p&gt;
&lt;h2&gt;Features&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Curated prompts grouped into decks&lt;/li&gt;
&lt;li&gt;Swipe through cards like a real deck&lt;/li&gt;
&lt;li&gt;Group play across multiple devices&lt;/li&gt;
&lt;li&gt;Bookmark cards to a saved list&lt;/li&gt;
&lt;li&gt;Premium card packs via Stripe&lt;/li&gt;
&lt;li&gt;Mobile-first layout&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Technology Stack&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Next.js 14 (App Router)&lt;/li&gt;
&lt;li&gt;Prisma ORM&lt;/li&gt;
&lt;li&gt;NextAuth&lt;/li&gt;
&lt;li&gt;Stripe&lt;/li&gt;
&lt;li&gt;OpenTelemetry for tracing&lt;/li&gt;
&lt;li&gt;Tailwind CSS + DaisyUI&lt;/li&gt;
&lt;/ul&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Cooking for Hackers</title><link>https://briansunter.com/newsletter/issue-16</link><guid isPermaLink="true">https://briansunter.com/newsletter/issue-16</guid><description>How I&apos;m optimizing my cooking process and organizing my recipes.</description><pubDate>Mon, 08 Apr 2024 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/1713157492098_0.u-TbefAn_Z1SGDhj.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;h3&gt;Introduction&lt;/h3&gt;
&lt;p&gt;In the past few years I’ve been trying to improve my cooking skills and streamline my overall process for preparing meals. Cooking wholesome meals for yourself is one of the best things you can do for your health and saves a lot of money. Plus, you can tailor your recipes to your exact preferences and cook really unique dishes that you can’t find anywhere.&lt;/p&gt;
&lt;h3&gt;Challenges&lt;/h3&gt;
&lt;p&gt;Over the years, I’ve found it challenging to consistently cook for myself. After starting to work in an office, I found myself eating out for lunch and picking up dinner more often. I struggled planning ahead and making sure I had fresh ingredients on hand and meals planned out.&lt;/p&gt;
&lt;p&gt;I experimented with traditional “meal prep,” where you bulk prepare meals in advance. While this approach was efficient, as someone who appreciates good food, I got tired of eating the same multiple days in a row. Reheated meals just weren’t as appetizing as freshly cooked ones. I also tried different diets, like keto, but found the ingredient restrictions too limiting.&lt;/p&gt;
&lt;p&gt;Eventually, I realized that I most enjoyed cooking meals daily and the key to success was proper planning.&lt;/p&gt;
&lt;h3&gt;Planning&lt;/h3&gt;
&lt;p&gt;The biggest improvement in my process has been planning all my meals and grocery shopping ahead of time. When I’m efficient with this, the daily cooking and cleaning become much less of an issue.&lt;/p&gt;
&lt;p&gt;Here’s my process:&lt;/p&gt;
&lt;p&gt;At the beginning of each week, I plan my recipes, trying to vary the proteins each day&lt;/p&gt;
&lt;p&gt;I use Logseq to do my weekly planning and the cooklang app to manage my recipes.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Planning my weekly recipes in Logseq&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 826px) 826px, 100vw&quot; width=&quot;826&quot; height=&quot;1168&quot; src=&quot;https://briansunter.com/_astro/1713158284017_0.BhMvk2Dt_1MkrJT.webp&quot; srcset=&quot;https://briansunter.com/_astro/1713158284017_0.BhMvk2Dt_Z2htPgj.webp 640w, https://briansunter.com/_astro/1713158284017_0.BhMvk2Dt_Z390IO.webp 750w, https://briansunter.com/_astro/1713158284017_0.BhMvk2Dt_1MkrJT.webp 826w&quot; /&gt;&lt;figcaption&gt;Planning my weekly recipes in Logseq&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;I focus on meals that are primarily meat and vegetables but include a carb in every dish.&lt;/p&gt;
&lt;p&gt;I enjoy baking items like &lt;a href=&quot;https://briansunter.com/recipes/pizza-dough&quot;&gt;garlic knots&lt;/a&gt; and &lt;a href=&quot;https://briansunter.com/recipes/milk-bread&quot;&gt;dinner rolls&lt;/a&gt;, as having a few different food types makes the meal feel more complete. I love having fresh baked bread a few times per week but eat reasonable portions, like 1 or 2 dinner rolls.&lt;/p&gt;
&lt;p&gt;Each week, I try one new recipe but mostly stick to favorites that I’m skilled at cooking.&lt;/p&gt;
&lt;p&gt;I mostly focus on dinner, but have a few light meals throughout the day like a protein shake, sandwich, cold cuts with cheese, or assorted leftovers.&lt;/p&gt;
&lt;h3&gt;Freezing&lt;/h3&gt;
&lt;p&gt;I purchase most of my ingredients in bulk at Costco and freeze them. I find frozen meats taste just as good, as long as it’s not frozen too long, or frozen properly like in a vacuum sealer.&lt;/p&gt;
&lt;p&gt;I recently found out a few staples like butter, cheese, and peeled garlic can be frozen, which makes it easier to have them on hand.&lt;/p&gt;
&lt;p&gt;Another great thing is to freeze dough after it’s partially risen. One of my favorite hacks is to bulk prepare dinner rolls, let them rise as individual rolls, and freeze individual portions. You can then take a few out at a time and let them thaw and continue to rise to have fresh dinner rolls any time.&lt;/p&gt;
&lt;p&gt;There’s a couple of other things I always have in my freezer that keep well, like pre frozen veggies, udon noodles, potstickers,&lt;/p&gt;
&lt;h3&gt;Basic Staples&lt;/h3&gt;
&lt;p&gt;There are certain things you can easily cook yourself that are much better than buying premade, like bread.&lt;/p&gt;
&lt;p&gt;There’s also a number of add ons you can make that make your meals much tastier like &lt;a href=&quot;https://briansunter.com/recipes/quick-pickled-vegetables&quot;&gt;pickled vegetables&lt;/a&gt; and &lt;a href=&quot;https://briansunter.com/recipes/all-purpose-barbecue-sauce&quot;&gt;homemade sauces&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;Organizing my Recipes&lt;/h3&gt;
&lt;p&gt;As I’ve become more experienced in cooking, I’ve discovered recipes that I enjoy and started customizing them. While AI and recipe sites provide a good starting point, after cooking a dish a few times, I begin adjusting it to my preferences, such as adjusting cooking times or ingredient amounts.&lt;/p&gt;
&lt;p&gt;To precisely store my recipes, I use a format called &lt;a href=&quot;https://briansunter.com/cooklang&quot;&gt;cooklang&lt;/a&gt; and manage them using Git, the same technology I use for my code. This allows me to carefully track modifications over time as I improve my cooking skills. See cooklang|this blog post on cooklang for for info&lt;/p&gt;
&lt;p&gt;I even created an &lt;a href=&quot;https://chat.openai.com/g/g-wCAG6LITN-cooklang-chef&quot;&gt;AI ChatGPT bot that converts recipes into the Cooklang format&lt;/a&gt;. It still isn’t very reliable but it’s a good starting point for writing recipes.&lt;/p&gt;
&lt;p&gt;My favorite feature of Cooklang is the ability to add multiple recipes to a shopping list, optimizing my grocery shopping. The app also provides step-by-step instructions while cooking.&lt;/p&gt;
&lt;h3&gt;My Recipe Site&lt;/h3&gt;
&lt;p&gt;Frustrated with the bloat of typical recipe sites, I decided to create my own. Since my recipes are in Cooklang format, it’s easy to publish and share them online.&lt;/p&gt;
&lt;p&gt;See &lt;a href=&quot;https://briansunter.com/recipes&quot;&gt;my recipe collection here&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;When designing my recipe site, I kept the following in mind:&lt;/p&gt;
&lt;p&gt;No bloat: The site should load quickly and not be jarring with ads. Simple descriptions or recipes, without long blog posts.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Very short title and introduction to recipes&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1730px) 1730px, 100vw&quot; width=&quot;1730&quot; height=&quot;720&quot; src=&quot;https://briansunter.com/_astro/1713161377131_0.CBM0zij8_2jW5u1.webp&quot; srcset=&quot;https://briansunter.com/_astro/1713161377131_0.CBM0zij8_1hT4Fj.webp 640w, https://briansunter.com/_astro/1713161377131_0.CBM0zij8_2p1q4p.webp 750w, https://briansunter.com/_astro/1713161377131_0.CBM0zij8_1dWdlF.webp 828w, https://briansunter.com/_astro/1713161377131_0.CBM0zij8_1JcNKK.webp 1080w, https://briansunter.com/_astro/1713161377131_0.CBM0zij8_Z202z1r.webp 1280w, https://briansunter.com/_astro/1713161377131_0.CBM0zij8_Z2uiXsQ.webp 1668w, https://briansunter.com/_astro/1713161377131_0.CBM0zij8_2jW5u1.webp 1730w&quot; /&gt;&lt;figcaption&gt;Very short title and introduction to recipes&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Ingredients listed in the recipe list, allowing users to decide whether to make a dish without clicking on the recipe.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Ingredients shown on recipe list&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1730px) 1730px, 100vw&quot; width=&quot;1730&quot; height=&quot;1448&quot; src=&quot;https://briansunter.com/_astro/1713161458559_0.B0y-7FPB_Z1lYdjx.webp&quot; srcset=&quot;https://briansunter.com/_astro/1713161458559_0.B0y-7FPB_NM4EM.webp 640w, https://briansunter.com/_astro/1713161458559_0.B0y-7FPB_gUPV1.webp 750w, https://briansunter.com/_astro/1713161458559_0.B0y-7FPB_1bNd7A.webp 828w, https://briansunter.com/_astro/1713161458559_0.B0y-7FPB_C1BbE.webp 1080w, https://briansunter.com/_astro/1713161458559_0.B0y-7FPB_ZMGNpz.webp 1280w, https://briansunter.com/_astro/1713161458559_0.B0y-7FPB_10XPMO.webp 1668w, https://briansunter.com/_astro/1713161458559_0.B0y-7FPB_Z1lYdjx.webp 1730w&quot; /&gt;&lt;figcaption&gt;Ingredients shown on recipe list&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Ingredients and instructions at the top of the page.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Simple ingredients, cookware, and instructions&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1730px) 1730px, 100vw&quot; width=&quot;1730&quot; height=&quot;1450&quot; src=&quot;https://briansunter.com/_astro/1713161535491_0.C1sW5mVX_Vz4xm.webp&quot; srcset=&quot;https://briansunter.com/_astro/1713161535491_0.C1sW5mVX_1nHuSz.webp 640w, https://briansunter.com/_astro/1713161535491_0.C1sW5mVX_1n2a49.webp 750w, https://briansunter.com/_astro/1713161535491_0.C1sW5mVX_2hTwfI.webp 828w, https://briansunter.com/_astro/1713161535491_0.C1sW5mVX_ZR9FoO.webp 1080w, https://briansunter.com/_astro/1713161535491_0.C1sW5mVX_Z1bW8lb.webp 1280w, https://briansunter.com/_astro/1713161535491_0.C1sW5mVX_BIvRd.webp 1668w, https://briansunter.com/_astro/1713161535491_0.C1sW5mVX_Vz4xm.webp 1730w&quot; /&gt;&lt;figcaption&gt;Simple ingredients, cookware, and instructions&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Inline ingredient amounts in instructions to avoid the need to scroll back to the top of the recipe while cooking.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Ingredients amounts are included with gray background in instructions &quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1730px) 1730px, 100vw&quot; width=&quot;1730&quot; height=&quot;674&quot; src=&quot;https://briansunter.com/_astro/1713161554003_0.CCBirfnd_2jNxN0.webp&quot; srcset=&quot;https://briansunter.com/_astro/1713161554003_0.CCBirfnd_ZkpnQJ.webp 640w, https://briansunter.com/_astro/1713161554003_0.CCBirfnd_Z1tNop1.webp 750w, https://briansunter.com/_astro/1713161554003_0.CCBirfnd_ZXz17q.webp 828w, https://briansunter.com/_astro/1713161554003_0.CCBirfnd_1oxaYI.webp 1080w, https://briansunter.com/_astro/1713161554003_0.CCBirfnd_96BL6.webp 1280w, https://briansunter.com/_astro/1713161554003_0.CCBirfnd_2a48QG.webp 1668w, https://briansunter.com/_astro/1713161554003_0.CCBirfnd_2jNxN0.webp 1730w&quot; /&gt;&lt;figcaption&gt;Ingredients amounts are included with gray background in instructions &lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Highlighting: I highlight the amounts and important values in gray, cookware in red, and times in yellow to make skimming easier.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Cooklang syntax highlighting with colored amounts, cookware, and times&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1730px) 1730px, 100vw&quot; width=&quot;1730&quot; height=&quot;674&quot; src=&quot;https://briansunter.com/_astro/1713161554003_0.CCBirfnd_2jNxN0.webp&quot; srcset=&quot;https://briansunter.com/_astro/1713161554003_0.CCBirfnd_ZkpnQJ.webp 640w, https://briansunter.com/_astro/1713161554003_0.CCBirfnd_Z1tNop1.webp 750w, https://briansunter.com/_astro/1713161554003_0.CCBirfnd_ZXz17q.webp 828w, https://briansunter.com/_astro/1713161554003_0.CCBirfnd_1oxaYI.webp 1080w, https://briansunter.com/_astro/1713161554003_0.CCBirfnd_96BL6.webp 1280w, https://briansunter.com/_astro/1713161554003_0.CCBirfnd_2a48QG.webp 1668w, https://briansunter.com/_astro/1713161554003_0.CCBirfnd_2jNxN0.webp 1730w&quot; /&gt;&lt;figcaption&gt;Cooklang syntax highlighting with colored amounts, cookware, and times&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;At the bottom of each recipe, I include the cooklang code with a copy link so you can save the recipe in Cooklang format. I even got Cooklang specific syntax highlighting working in the code block.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Copy cooklang recipe on any page&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 2920px) 2920px, 100vw&quot; width=&quot;2920&quot; height=&quot;1158&quot; src=&quot;https://briansunter.com/_astro/1713162065176_0.DSFUSGh4_1ccE98.webp&quot; srcset=&quot;https://briansunter.com/_astro/1713162065176_0.DSFUSGh4_Z2sQ5sw.webp 640w, https://briansunter.com/_astro/1713162065176_0.DSFUSGh4_ZuByMV.webp 750w, https://briansunter.com/_astro/1713162065176_0.DSFUSGh4_1SoQVJ.webp 828w, https://briansunter.com/_astro/1713162065176_0.DSFUSGh4_Z1NOKg7.webp 1080w, https://briansunter.com/_astro/1713162065176_0.DSFUSGh4_cdUw3.webp 1280w, https://briansunter.com/_astro/1713162065176_0.DSFUSGh4_ZNBSEK.webp 1668w, https://briansunter.com/_astro/1713162065176_0.DSFUSGh4_2sOnxN.webp 2048w, https://briansunter.com/_astro/1713162065176_0.DSFUSGh4_Z1F6qdT.webp 2560w, https://briansunter.com/_astro/1713162065176_0.DSFUSGh4_1ccE98.webp 2920w&quot; /&gt;&lt;figcaption&gt;Copy cooklang recipe on any page&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h3&gt;Cooklang app&lt;/h3&gt;
&lt;p&gt;After I plan what recipes I want to make and get them in cooklang format. I can use the cooklang app to create shopping lists of lists of ingredients for all the recipes I plan on cooking.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Cooklang app recipe collection&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1488px) 1488px, 100vw&quot; width=&quot;1488&quot; height=&quot;2266&quot; src=&quot;https://briansunter.com/_astro/IMG_0039_1713162304852_0.BVy9fkoz_ZLO331.webp&quot; srcset=&quot;https://briansunter.com/_astro/IMG_0039_1713162304852_0.BVy9fkoz_Z28X5Vf.webp 640w, https://briansunter.com/_astro/IMG_0039_1713162304852_0.BVy9fkoz_fbTaS.webp 750w, https://briansunter.com/_astro/IMG_0039_1713162304852_0.BVy9fkoz_2lJHI8.webp 828w, https://briansunter.com/_astro/IMG_0039_1713162304852_0.BVy9fkoz_27lW8m.webp 1080w, https://briansunter.com/_astro/IMG_0039_1713162304852_0.BVy9fkoz_Z1enBLR.webp 1280w, https://briansunter.com/_astro/IMG_0039_1713162304852_0.BVy9fkoz_ZLO331.webp 1488w&quot; /&gt;&lt;figcaption&gt;Cooklang app recipe collection&lt;/figcaption&gt;&lt;/figure&gt;
&lt;figure&gt;&lt;img alt=&quot;Viewing a recipe in cooklang&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1488px) 1488px, 100vw&quot; width=&quot;1488&quot; height=&quot;2266&quot; src=&quot;https://briansunter.com/_astro/IMG_0040_1713162338379_0.bcqKYdwQ_Z1ei7iR.webp&quot; srcset=&quot;https://briansunter.com/_astro/IMG_0040_1713162338379_0.bcqKYdwQ_Z1OPndd.webp 640w, https://briansunter.com/_astro/IMG_0040_1713162338379_0.bcqKYdwQ_yjBSU.webp 750w, https://briansunter.com/_astro/IMG_0040_1713162338379_0.bcqKYdwQ_Z2pjHmL.webp 828w, https://briansunter.com/_astro/IMG_0040_1713162338379_0.bcqKYdwQ_1ERRRv.webp 1080w, https://briansunter.com/_astro/IMG_0040_1713162338379_0.bcqKYdwQ_Z1FQG2I.webp 1280w, https://briansunter.com/_astro/IMG_0040_1713162338379_0.bcqKYdwQ_Z1ei7iR.webp 1488w&quot; /&gt;&lt;figcaption&gt;Viewing a recipe in cooklang&lt;/figcaption&gt;&lt;/figure&gt;
&lt;figure&gt;&lt;img alt=&quot;Using cooklang while cooking&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1488px) 1488px, 100vw&quot; width=&quot;1488&quot; height=&quot;2266&quot; src=&quot;https://briansunter.com/_astro/IMG_0044_1713162510087_0.CvRhRV6Z_ZBMNgk.webp&quot; srcset=&quot;https://briansunter.com/_astro/IMG_0044_1713162510087_0.CvRhRV6Z_Zkz4ij.webp 640w, https://briansunter.com/_astro/IMG_0044_1713162510087_0.CvRhRV6Z_23zUNO.webp 750w, https://briansunter.com/_astro/IMG_0044_1713162510087_0.CvRhRV6Z_ZU3orR.webp 828w, https://briansunter.com/_astro/IMG_0044_1713162510087_0.CvRhRV6Z_2hnbU3.webp 1080w, https://briansunter.com/_astro/IMG_0044_1713162510087_0.CvRhRV6Z_Z14mn0b.webp 1280w, https://briansunter.com/_astro/IMG_0044_1713162510087_0.CvRhRV6Z_ZBMNgk.webp 1488w&quot; /&gt;&lt;figcaption&gt;Using cooklang while cooking&lt;/figcaption&gt;&lt;/figure&gt;
&lt;figure&gt;&lt;img alt=&quot;Combined shopping list of all recipes&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1488px) 1488px, 100vw&quot; width=&quot;1488&quot; height=&quot;2266&quot; src=&quot;https://briansunter.com/_astro/IMG_0042_1713162549395_0.BTlFSp21_ZMhdde.webp&quot; srcset=&quot;https://briansunter.com/_astro/IMG_0042_1713162549395_0.BTlFSp21_Z1tWqLc.webp 640w, https://briansunter.com/_astro/IMG_0042_1713162549395_0.BTlFSp21_TcykV.webp 750w, https://briansunter.com/_astro/IMG_0042_1713162549395_0.BTlFSp21_Z24qKUK.webp 828w, https://briansunter.com/_astro/IMG_0042_1713162549395_0.BTlFSp21_26SLX9.webp 1080w, https://briansunter.com/_astro/IMG_0042_1713162549395_0.BTlFSp21_Z1ePLW5.webp 1280w, https://briansunter.com/_astro/IMG_0042_1713162549395_0.BTlFSp21_ZMhdde.webp 1488w&quot; /&gt;&lt;figcaption&gt;Combined shopping list of all recipes&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;By optimizing my meal planning, grocery shopping, and recipe management, I’ve been able to elevate my cooking skills and enjoy great, home-cooked meals without spending much time or money.&lt;/p&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Year in Review - Hawaii, Health, and Projects</title><link>https://briansunter.com/newsletter/issue-15</link><guid isPermaLink="true">https://briansunter.com/newsletter/issue-15</guid><description>Thoughts on living in Hawaii for the past year and recent projects</description><pubDate>Wed, 20 Mar 2024 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/hawaii-cover_1710985966457_0.Dedg74xg_ZE1660.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;It’s been an interesting year living in one of the most isolated places on Earth.&lt;/p&gt;
&lt;p&gt;After living in San Francisco for over 7 years, my partner and I were ready to try something new. We had a few places in mind, but Hawaii really excited us. It wasn’t easy moving our lives here, it took many sleepless nights packing up our Bay Area apartment and fitting everything we’d take with us in just a few suitcases.&lt;/p&gt;
&lt;p&gt;Now a year later, we’re settled in and have gotten into our new routines and exploring Oahu as well as a few neighboring islands like Big Island, and Maui. Living here has been great for many reasons.&lt;/p&gt;
&lt;h2&gt;Living in Hawaii&lt;/h2&gt;
&lt;p&gt;My favorite thing about being here is the overall positivity in how people interact. I’ve consistently experienced general pleasantness and random acts of goodwill in a variety of situations. The good vibe is noticeable when meeting people and in day-to-day interactions like grocery shopping and running errands. All different types of people are outside enjoying life.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Watching an Outrigger Canoe Race and Plein Air Painters&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 2117px) 2117px, 100vw&quot; width=&quot;2117&quot; height=&quot;2822&quot; src=&quot;https://briansunter.com/_astro/IMG_4299_1710986900237_0.BqCIdclw_fYje7.webp&quot; srcset=&quot;https://briansunter.com/_astro/IMG_4299_1710986900237_0.BqCIdclw_Zcc9Cn.webp 640w, https://briansunter.com/_astro/IMG_4299_1710986900237_0.BqCIdclw_1sD0nk.webp 750w, https://briansunter.com/_astro/IMG_4299_1710986900237_0.BqCIdclw_9d3Na.webp 828w, https://briansunter.com/_astro/IMG_4299_1710986900237_0.BqCIdclw_ZjXCL1.webp 1080w, https://briansunter.com/_astro/IMG_4299_1710986900237_0.BqCIdclw_27wEYs.webp 1280w, https://briansunter.com/_astro/IMG_4299_1710986900237_0.BqCIdclw_lbOko.webp 1668w, https://briansunter.com/_astro/IMG_4299_1710986900237_0.BqCIdclw_1LfYdE.webp 2048w, https://briansunter.com/_astro/IMG_4299_1710986900237_0.BqCIdclw_fYje7.webp 2117w&quot; /&gt;&lt;figcaption&gt;Watching an Outrigger Canoe Race and Plein Air Painters&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;One of my goals is to be more social, and I’ve had many positive interactions. I have pleasant chats with neighbors and people around town. I’m getting used to strangers saying hi, recognizing me, and positively engaging. I’ve enjoyed meeting a variety of people and hearing their stories.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Joining a &amp;quot;Sketch and Chat&amp;quot; Meetup Group and Meeting Local Artists&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 3024px) 3024px, 100vw&quot; width=&quot;3024&quot; height=&quot;4032&quot; src=&quot;https://briansunter.com/_astro/image_1710986995692_0.18QANSc2_Z24vtYn.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1710986995692_0.18QANSc2_16ovCl.webp 640w, https://briansunter.com/_astro/image_1710986995692_0.18QANSc2_Zois6U.webp 750w, https://briansunter.com/_astro/image_1710986995692_0.18QANSc2_Z14EgoI.webp 828w, https://briansunter.com/_astro/image_1710986995692_0.18QANSc2_Z2pkv3g.webp 1080w, https://briansunter.com/_astro/image_1710986995692_0.18QANSc2_ZjfgCF.webp 1280w, https://briansunter.com/_astro/image_1710986995692_0.18QANSc2_Z1w24Od.webp 1668w, https://briansunter.com/_astro/image_1710986995692_0.18QANSc2_1y4Y1K.webp 2048w, https://briansunter.com/_astro/image_1710986995692_0.18QANSc2_1LkKbU.webp 2560w, https://briansunter.com/_astro/image_1710986995692_0.18QANSc2_Z24vtYn.webp 3024w&quot; /&gt;&lt;figcaption&gt;Joining a &quot;Sketch and Chat&quot; Meetup Group and Meeting Local Artists&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The change in environment has had a noticeable positive effect on my overall well-being.&lt;/p&gt;
&lt;p&gt;I’ve gotten more physically fit after reconnecting with some hobbies like lifting weights and paddleboarding. My favorite activity overall is going on long swims down Waikiki Beach. I see something amazing every time I go swimming, like sea turtles or schools of fish.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Paddleboarding Down Ala Moana Beach&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1038px) 1038px, 100vw&quot; width=&quot;1038&quot; height=&quot;1002&quot; src=&quot;https://briansunter.com/_astro/paddleboarding_1711152811205_0.DSEOMa7w_Z1LXnRb.webp&quot; srcset=&quot;https://briansunter.com/_astro/paddleboarding_1711152811205_0.DSEOMa7w_ZXjYb5.webp 640w, https://briansunter.com/_astro/paddleboarding_1711152811205_0.DSEOMa7w_Z23ESSd.webp 750w, https://briansunter.com/_astro/paddleboarding_1711152811205_0.DSEOMa7w_1Jqwqa.webp 828w, https://briansunter.com/_astro/paddleboarding_1711152811205_0.DSEOMa7w_Z1LXnRb.webp 1038w&quot; /&gt;&lt;figcaption&gt;Paddleboarding Down Ala Moana Beach&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;One of my main goals was to get more physically healthy and I’ve made some progress. Spending more time outside, waking up around sunrise, and starting my day with a nice walk has reset my sleep cycle, whereas before I used to stay up pretty late.&lt;/p&gt;
&lt;p&gt;Another favorite activity has been meal prepping. I’ve been improving my cooking skills and learning how to cook better healthy meals for myself. Grilled meats and veggies on the outdoor grill have been a great meal prep hack since it’s so tasty and healthy. Plus it’s really nice to be outside and hang out while cooking.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Grilled Meat Meal Prep&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 3024px) 3024px, 100vw&quot; width=&quot;3024&quot; height=&quot;4032&quot; src=&quot;https://briansunter.com/_astro/IMG_2702_2_1710987614171_0.D8CjqyB9_ZY44cv.webp&quot; srcset=&quot;https://briansunter.com/_astro/IMG_2702_2_1710987614171_0.D8CjqyB9_lFV4.webp 640w, https://briansunter.com/_astro/IMG_2702_2_1710987614171_0.D8CjqyB9_wk2Rz.webp 750w, https://briansunter.com/_astro/IMG_2702_2_1710987614171_0.D8CjqyB9_ZpsCbR.webp 828w, https://briansunter.com/_astro/IMG_2702_2_1710987614171_0.D8CjqyB9_2ebW0A.webp 1080w, https://briansunter.com/_astro/IMG_2702_2_1710987614171_0.D8CjqyB9_ZJK9fs.webp 1280w, https://briansunter.com/_astro/IMG_2702_2_1710987614171_0.D8CjqyB9_Z10dMDn.webp 1668w, https://briansunter.com/_astro/IMG_2702_2_1710987614171_0.D8CjqyB9_IJh55.webp 2048w, https://briansunter.com/_astro/IMG_2702_2_1710987614171_0.D8CjqyB9_Z1eFYlA.webp 2560w, https://briansunter.com/_astro/IMG_2702_2_1710987614171_0.D8CjqyB9_ZY44cv.webp 3024w&quot; /&gt;&lt;figcaption&gt;Grilled Meat Meal Prep&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2&gt;Highlights&lt;/h2&gt;
&lt;p&gt;My other favorite hobby is exploring the islands and learning about the places, their history, legends, and creatures. I have a bucket list of locations and seek out new spots often. Even after a year of exploring, there are still so many more places to see.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Green Sea Turtles on North Shore&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 2016px) 2016px, 100vw&quot; width=&quot;2016&quot; height=&quot;1512&quot; src=&quot;https://briansunter.com/_astro/turtle_1711156269341_0.qbIH2r3C_zvdVQ.webp&quot; srcset=&quot;https://briansunter.com/_astro/turtle_1711156269341_0.qbIH2r3C_Gxb5X.webp 640w, https://briansunter.com/_astro/turtle_1711156269341_0.qbIH2r3C_QYXcR.webp 750w, https://briansunter.com/_astro/turtle_1711156269341_0.qbIH2r3C_1JXcjL.webp 828w, https://briansunter.com/_astro/turtle_1711156269341_0.qbIH2r3C_Z28xOHW.webp 1080w, https://briansunter.com/_astro/turtle_1711156269341_0.qbIH2r3C_Z1MqBSi.webp 1280w, https://briansunter.com/_astro/turtle_1711156269341_0.qbIH2r3C_20yT5Q.webp 1668w, https://briansunter.com/_astro/turtle_1711156269341_0.qbIH2r3C_zvdVQ.webp 2016w&quot; /&gt;&lt;figcaption&gt;Green Sea Turtles on North Shore&lt;/figcaption&gt;&lt;/figure&gt;
&lt;figure&gt;&lt;img alt=&quot;An Active Lava Eruption at Volcanos National Park&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1880px) 1880px, 100vw&quot; width=&quot;1880&quot; height=&quot;1171&quot; src=&quot;https://briansunter.com/_astro/big-island_1711154331451_0.DR57hNRv_Z1OTVcT.webp&quot; srcset=&quot;https://briansunter.com/_astro/big-island_1711154331451_0.DR57hNRv_Z1H8upL.webp 640w, https://briansunter.com/_astro/big-island_1711154331451_0.DR57hNRv_181r6B.webp 750w, https://briansunter.com/_astro/big-island_1711154331451_0.DR57hNRv_2wTNSd.webp 828w, https://briansunter.com/_astro/big-island_1711154331451_0.DR57hNRv_19AH9E.webp 1080w, https://briansunter.com/_astro/big-island_1711154331451_0.DR57hNRv_pAGq0.webp 1280w, https://briansunter.com/_astro/big-island_1711154331451_0.DR57hNRv_1SvqRe.webp 1668w, https://briansunter.com/_astro/big-island_1711154331451_0.DR57hNRv_Z1OTVcT.webp 1880w&quot; /&gt;&lt;figcaption&gt;An Active Lava Eruption at Volcanos National Park&lt;/figcaption&gt;&lt;/figure&gt;
&lt;figure&gt;&lt;img alt=&quot;Watching the Pipe Masters Surf Competition at Pipeline, North Shore&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 3024px) 3024px, 100vw&quot; width=&quot;3024&quot; height=&quot;4032&quot; src=&quot;https://briansunter.com/_astro/IMG_3510_1710987442862_0.DG8GO0mK_P6AWP.webp&quot; srcset=&quot;https://briansunter.com/_astro/IMG_3510_1710987442862_0.DG8GO0mK_Z1zGdjy.webp 640w, https://briansunter.com/_astro/IMG_3510_1710987442862_0.DG8GO0mK_58VG9.webp 750w, https://briansunter.com/_astro/IMG_3510_1710987442862_0.DG8GO0mK_Z1egYS1.webp 828w, https://briansunter.com/_astro/IMG_3510_1710987442862_0.DG8GO0mK_2uwM9N.webp 1080w, https://briansunter.com/_astro/IMG_3510_1710987442862_0.DG8GO0mK_Z2lqLAi.webp 1280w, https://briansunter.com/_astro/IMG_3510_1710987442862_0.DG8GO0mK_Wpvyz.webp 1668w, https://briansunter.com/_astro/IMG_3510_1710987442862_0.DG8GO0mK_2ntFrP.webp 2048w, https://briansunter.com/_astro/IMG_3510_1710987442862_0.DG8GO0mK_Z4cgft.webp 2560w, https://briansunter.com/_astro/IMG_3510_1710987442862_0.DG8GO0mK_P6AWP.webp 3024w&quot; /&gt;&lt;figcaption&gt;Watching the Pipe Masters Surf Competition at Pipeline, North Shore&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2&gt;Projects and AI&lt;/h2&gt;
&lt;p&gt;My intellectual and professional pursuits are also going well. I’m working on some exciting projects for work and on the side. Thanks to everyone who reached out with work and collaboration around mutual interests. I’ve had some very interesting video calls with people from all over the world.&lt;/p&gt;
&lt;iframe width=&quot;100%&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/RzT20ejft3c&quot; frameborder=&quot;0&quot; loading=&quot;lazy&quot; allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen&gt;&lt;/iframe&gt;
&lt;p&gt;My main technical interest right now is AI, and I’ve been studying fundamentals and building product prototypes around it. AI gives me the same feeling as developing for the early iPhone, where every new capability opened up many possibilities. Every few months, a new AI model or capability is announced, and many new features, products, or companies could be built around them. Combining current breakthroughs in valuable ways has a lot of potential.&lt;/p&gt;
&lt;p&gt;GPT-3 was the first model that amazed me, but the release of GPT-4 last year was the first model that could reliably do useful work. It’s funny looking back on some of the tools I was amazed with when I first started this newsletter and how far they’ve come since then.&lt;/p&gt;
&lt;p&gt;Last year, I launched version 2 of my Logseq OpenAI plugin, which got ~60k downloads and some positive feedback. This year, I’ll improve it and add some additional features I had in mind that have been requested. I’m still actively exploring the space of “Second Brain” + AI.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;My Logseq OpenAI Plugin&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 720px) 720px, 100vw&quot; width=&quot;720&quot; height=&quot;401&quot; src=&quot;https://briansunter.com/_astro/image_1710988241968_0.DmhCj0gT_qtvtO.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1710988241968_0.DmhCj0gT_ZLYon7.webp 640w, https://briansunter.com/_astro/image_1710988241968_0.DmhCj0gT_qtvtO.webp 720w&quot; /&gt;&lt;figcaption&gt;My Logseq OpenAI Plugin&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;I worked on a few other AI tools and products but didn’t release them but I plan to incorporate some of these experiments into future projects.&lt;/p&gt;
&lt;p&gt;Another new hobby is data science, and I have been working on some mini projects around interesting datasets I’ve collected. I have published a few on my blog, like Wikipedia embeddings and coffee ratings, and I’m working on a few others. AI tools make data science much faster and more enjoyable since they can automate some of the data cleaning and graphing aspects.&lt;/p&gt;
&lt;p&gt;For learning the fundamentals of AI, my favorite resources have been:&lt;/p&gt;
&lt;p&gt;Karpathy’s Videos, &lt;a href=&quot;https://www.amazon.com/Sebastian-Raschka/e/B00J1DHHFS/ref=dp_byline_cont_ebooks_1&quot;&gt;Sebastian Raschka’s Machine Learning Book&lt;/a&gt;, and &lt;a href=&quot;https://www.deeplearning.ai/&quot;&gt;Andrew Ng’s machine learning courses.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It’s been interesting, fun, and humbling to revisit some long-lost math.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;mathml&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1752px) 1752px, 100vw&quot; width=&quot;1752&quot; height=&quot;748&quot; src=&quot;https://briansunter.com/_astro/mathml_1711158317502_0.BJNQmVn8_1RojiB.webp&quot; srcset=&quot;https://briansunter.com/_astro/mathml_1711158317502_0.BJNQmVn8_Z2tumFs.webp 640w, https://briansunter.com/_astro/mathml_1711158317502_0.BJNQmVn8_ZsQht5.webp 750w, https://briansunter.com/_astro/mathml_1711158317502_0.BJNQmVn8_Z1Fhxf5.webp 828w, https://briansunter.com/_astro/mathml_1711158317502_0.BJNQmVn8_2wMydT.webp 1080w, https://briansunter.com/_astro/mathml_1711158317502_0.BJNQmVn8_Z2lRmaW.webp 1280w, https://briansunter.com/_astro/mathml_1711158317502_0.BJNQmVn8_1mnDXx.webp 1668w, https://briansunter.com/_astro/mathml_1711158317502_0.BJNQmVn8_1RojiB.webp 1752w&quot; /&gt;&lt;figcaption&gt;mathml&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;I was nervous moving out here, and there have been some challenges, but so far, everything has been manageable and gone better than expected. Overall, it’s been a great year prioritizing my health, working on interesting projects, and exploring an amazing place.&lt;/p&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Organizing Notes in 3D with AI</title><link>https://briansunter.com/newsletter/issue-14</link><guid isPermaLink="true">https://briansunter.com/newsletter/issue-14</guid><description>Using machine learning to automatically organize notes by meaning and exploring them in a browser 3D interface</description><pubDate>Wed, 27 Sep 2023 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/Screenshot_2023-09-27_at_1.28.29_PM_1695857318835_0.CFIsL3my_2u9NFM.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;p&gt;&lt;video src=&quot;../../assets/videos/draggraph_1695963788730_0.mp4&quot; muted&gt;&lt;/video&gt;&lt;/p&gt;
&lt;p&gt;Organizing notes and information is a challenge. Traditional methods like folders and tagging fall short because they require continuous manual effort to keep organized. What if we could leverage recent advances in machine learning to organize these notes automatically?&lt;/p&gt;
&lt;p&gt;Along with AI advancements, we have modern computing capable of rendering rich 3D environments. Yet, most user interfaces are still confined to a 2D plane.&lt;/p&gt;
&lt;p&gt;This post is an experiment that leverages machine learning text embeddings to organize information in a 3D space within your browser.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://briansunter.github.io/wikipedia-3d-embeddings/&quot;&gt;Go here to try the demo in your browser&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/briansunter/wikipedia-3d-embeddings&quot;&gt;Go here to see the code&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Inspiration&lt;/h3&gt;
&lt;p&gt;A few notetaking apps like Logseq, Obsidian, and Roam have a “graph view,” which displays your notes on a 2D canvas so that you can explore connections between ideas at a high level.&lt;/p&gt;
&lt;p&gt;Here’s a screenshot of my graph view in Logseq&lt;/p&gt;
&lt;p&gt;This type of graph is called a “force-directed layout.” When I create a link between pages, a line connects those pages. If I want to find topics related to “machine learning”, I can see which pages are connected.&lt;/p&gt;
&lt;p&gt;This view is useful, but I wanted to extend it with two ideas:&lt;/p&gt;
&lt;p&gt;First, Is there a way to automatically generate a view like this without manually linking pages? How can we use machine learning to discover these relationships and groups automatically?&lt;/p&gt;
&lt;p&gt;Second, Can we display the nodes in 3D to provide more insight into the relationships and make exploring large graphs with many nodes easier?&lt;/p&gt;
&lt;p&gt;Another similar project is the &lt;a href=&quot;https://projector.tensorflow.org/&quot;&gt;tensorflow embeddings projector&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This visualization uses machine learning to plot the relationships of individual words in 3D space. This is very close to what I want for my notes, but can we make it work for entire documents, instead of just individual words?&lt;/p&gt;
&lt;p&gt;&lt;video src=&quot;../../assets/videos/embeddings3_1695960386264_0.mp4&quot; muted&gt;&lt;/video&gt;&lt;/p&gt;
&lt;h3&gt;Intro to text embeddings&lt;/h3&gt;
&lt;p&gt;Text embeddings are lists of numbers generated by machine learning models that represent the “meaning” of a short piece of text. You can generate text embeddings for multiple pieces of text and calculate their “similarity” to each other.&lt;/p&gt;
&lt;p&gt;The text embedding models were trained on a large body of text, which allows them to understand the context and relationships between words and phrases. This enables them to differentiate between words with multiple meanings, identify synonyms, and understand nuances.&lt;/p&gt;
&lt;p&gt;For example, text embeddings could understand that the words “King” and “Queen” are similar, whereas “King” and “Dog” are not similar.&lt;/p&gt;
&lt;p&gt;This technique has two popular uses: search and clustering.&lt;/p&gt;
&lt;p&gt;In search, text embeddings help you find the page you search for, even when your search query doesn’t directly match the content. For example, if I searched “award-winning fantasy movies,” I would find “Lord of the Rings” and “Harry Potter,” even though these results don’t contain the search keywords like “movie” or “fantasy.”&lt;/p&gt;
&lt;p&gt;The other main application is grouping related text, which is the focus of this post.&lt;/p&gt;
&lt;h3&gt;Text embeddings and UMAP&lt;/h3&gt;
&lt;p&gt;After turning text into embeddings, you can use an algorithm called UMAP to arrange the articles in either 2D or 3D space. We give the algorithm a list of embeddings, and it returns 2D or 3D coordinate points for each embedding.&lt;/p&gt;
&lt;p&gt;In the visual representation, similar texts are grouped closely together.&lt;/p&gt;
&lt;h3&gt;The Dataset&lt;/h3&gt;
&lt;p&gt;The experiment features two datasets: &lt;a href=&quot;https://en.wikipedia.org/wiki/Wikipedia:Vital_articles&quot;&gt;Wikipedia’s 1000 “Level 3 Vital Articles”&lt;/a&gt; and &lt;a href=&quot;https://en.wikipedia.org/wiki/Wikipedia:Vital_articles/Level/4&quot;&gt;10,000 “Level 4 Vital Articles&lt;/a&gt;.”&lt;/p&gt;
&lt;p&gt;These lists are articles that Wikipedia thinks are most essential. Wikipedia editors manually organize them into history, people, geography, and science categories.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;wiki1k&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1012px) 1012px, 100vw&quot; width=&quot;1012&quot; height=&quot;1301&quot; src=&quot;https://briansunter.com/_astro/wiki1k_1695962173772_0.YPweNhOK_2a7osM.webp&quot; srcset=&quot;https://briansunter.com/_astro/wiki1k_1695962173772_0.YPweNhOK_Z2w03mO.webp 640w, https://briansunter.com/_astro/wiki1k_1695962173772_0.YPweNhOK_Z2t7RWK.webp 750w, https://briansunter.com/_astro/wiki1k_1695962173772_0.YPweNhOK_1pXtB8.webp 828w, https://briansunter.com/_astro/wiki1k_1695962173772_0.YPweNhOK_2a7osM.webp 1012w&quot; /&gt;&lt;figcaption&gt;wiki1k&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The demo has examples for the 1k and 10k sets of articles. Selecting the 10K option needs a reasonably powerful computer.&lt;/p&gt;
&lt;p&gt;When generating the embeddings for each Wikipedia article, I break each Wikipedia page into 500-word chunks and average the embeddings for each page to calculate the “average meaning” of the page.&lt;/p&gt;
&lt;p&gt;This same technique could be used for any document, such as notes or web pages, but Wikipedia is an interesting dataset for the demo.&lt;/p&gt;
&lt;h3&gt;The Result&lt;/h3&gt;
&lt;p&gt;As expected, the text embeddings naturally cluster the Wikipedia articles into similar groups, mimicking their manual categorizations. In these visualizations, I display the title of the Wikipedia page and position it based on the “meaning” of the text on that page.&lt;/p&gt;
&lt;h4&gt;2D Space&lt;/h4&gt;
&lt;p&gt;Let’s start by visualizing the articles in 2D space.&lt;/p&gt;
&lt;p&gt;UMAP generates a graph of points in 2D space based on the embeddings, and we can see clusters of similar articles forming.&lt;/p&gt;
&lt;p&gt;It’s hard to read the text in the clusters, but I didn’t spend much time optimizing the spacing for the 2D view.&lt;/p&gt;
&lt;h4&gt;Zoomed in&lt;/h4&gt;
&lt;p&gt;We can see articles about animals are grouped.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Screenshot 2023-09-27 at 11.42.44 AM&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 2222px) 2222px, 100vw&quot; width=&quot;2222&quot; height=&quot;1408&quot; src=&quot;https://briansunter.com/_astro/Screenshot_2023-09-27_at_11.42.44_AM_1695851450202_0.BpGEhmBC_1w5yqT.webp&quot; srcset=&quot;https://briansunter.com/_astro/Screenshot_2023-09-27_at_11.42.44_AM_1695851450202_0.BpGEhmBC_Z1qI3rB.webp 640w, https://briansunter.com/_astro/Screenshot_2023-09-27_at_11.42.44_AM_1695851450202_0.BpGEhmBC_2vMDHL.webp 750w, https://briansunter.com/_astro/Screenshot_2023-09-27_at_11.42.44_AM_1695851450202_0.BpGEhmBC_jfiLR.webp 828w, https://briansunter.com/_astro/Screenshot_2023-09-27_at_11.42.44_AM_1695851450202_0.BpGEhmBC_S3iyw.webp 1080w, https://briansunter.com/_astro/Screenshot_2023-09-27_at_11.42.44_AM_1695851450202_0.BpGEhmBC_22J30B.webp 1280w, https://briansunter.com/_astro/Screenshot_2023-09-27_at_11.42.44_AM_1695851450202_0.BpGEhmBC_ZbxaLx.webp 1668w, https://briansunter.com/_astro/Screenshot_2023-09-27_at_11.42.44_AM_1695851450202_0.BpGEhmBC_Ztb31m.webp 2048w, https://briansunter.com/_astro/Screenshot_2023-09-27_at_11.42.44_AM_1695851450202_0.BpGEhmBC_1w5yqT.webp 2222w&quot; /&gt;&lt;figcaption&gt;Screenshot 2023-09-27 at 11.42.44 AM&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Similarly, articles about food and ingredients are grouped.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Screenshot 2023-09-27 at 11.57.55 AM&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1360px) 1360px, 100vw&quot; width=&quot;1360&quot; height=&quot;870&quot; src=&quot;https://briansunter.com/_astro/Screenshot_2023-09-27_at_11.57.55_AM_1695851906326_0.C_Mar2fk_1f2zGG.webp&quot; srcset=&quot;https://briansunter.com/_astro/Screenshot_2023-09-27_at_11.57.55_AM_1695851906326_0.C_Mar2fk_1oYHep.webp 640w, https://briansunter.com/_astro/Screenshot_2023-09-27_at_11.57.55_AM_1695851906326_0.C_Mar2fk_2kl50M.webp 750w, https://briansunter.com/_astro/Screenshot_2023-09-27_at_11.57.55_AM_1695851906326_0.C_Mar2fk_Z23DYbX.webp 828w, https://briansunter.com/_astro/Screenshot_2023-09-27_at_11.57.55_AM_1695851906326_0.C_Mar2fk_ZBggEK.webp 1080w, https://briansunter.com/_astro/Screenshot_2023-09-27_at_11.57.55_AM_1695851906326_0.C_Mar2fk_ZsvP6D.webp 1280w, https://briansunter.com/_astro/Screenshot_2023-09-27_at_11.57.55_AM_1695851906326_0.C_Mar2fk_1f2zGG.webp 1360w&quot; /&gt;&lt;figcaption&gt;Screenshot 2023-09-27 at 11.57.55 AM&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h4&gt;Zoomed out 2D Plot&lt;/h4&gt;
&lt;p&gt;The visualization creates a huge 2d map of Wikipedia articles, and you can see clusters.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Screenshot 2023-09-27 at 11.43.35 AM&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 4206px) 4206px, 100vw&quot; width=&quot;4206&quot; height=&quot;2390&quot; src=&quot;https://briansunter.com/_astro/Screenshot_2023-09-27_at_11.43.35_AM_1695851313702_0.DvEvqd07_Z1KiwP.webp&quot; srcset=&quot;https://briansunter.com/_astro/Screenshot_2023-09-27_at_11.43.35_AM_1695851313702_0.DvEvqd07_1ENVkW.webp 640w, https://briansunter.com/_astro/Screenshot_2023-09-27_at_11.43.35_AM_1695851313702_0.DvEvqd07_1MuW0j.webp 750w, https://briansunter.com/_astro/Screenshot_2023-09-27_at_11.43.35_AM_1695851313702_0.DvEvqd07_Z1jb4dH.webp 828w, https://briansunter.com/_astro/Screenshot_2023-09-27_at_11.43.35_AM_1695851313702_0.DvEvqd07_TnOcu.webp 1080w, https://briansunter.com/_astro/Screenshot_2023-09-27_at_11.43.35_AM_1695851313702_0.DvEvqd07_4Hb5C.webp 1280w, https://briansunter.com/_astro/Screenshot_2023-09-27_at_11.43.35_AM_1695851313702_0.DvEvqd07_2tASqf.webp 1668w, https://briansunter.com/_astro/Screenshot_2023-09-27_at_11.43.35_AM_1695851313702_0.DvEvqd07_ZBvy3r.webp 2048w, https://briansunter.com/_astro/Screenshot_2023-09-27_at_11.43.35_AM_1695851313702_0.DvEvqd07_2b7Dj4.webp 2560w, https://briansunter.com/_astro/Screenshot_2023-09-27_at_11.43.35_AM_1695851313702_0.DvEvqd07_Z1KiwP.webp 4206w&quot; /&gt;&lt;figcaption&gt;Screenshot 2023-09-27 at 11.43.35 AM&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h4&gt;3D Space&lt;/h4&gt;
&lt;p&gt;Now, let’s try 3D space. We set &lt;code&gt;n_components&lt;/code&gt; to 3 in UMAP to generate 3D points from the embeddings.&lt;/p&gt;
&lt;p&gt;This view shows the articles in 3D.&lt;/p&gt;
&lt;p&gt;I added some additional features, such as rotating the text to face the camera, adding color based on location to show groupings, and rending distant nodes as a point.&lt;/p&gt;
&lt;p&gt;You can pan, rotate, and zoom around to explore the articles.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Screenshot 2023-09-27 at 1.28.29 PM&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 2724px) 2724px, 100vw&quot; width=&quot;2724&quot; height=&quot;2092&quot; src=&quot;https://briansunter.com/_astro/Screenshot_2023-09-27_at_1.28.29_PM_1695857318835_0.CFIsL3my_137On7.webp&quot; srcset=&quot;https://briansunter.com/_astro/Screenshot_2023-09-27_at_1.28.29_PM_1695857318835_0.CFIsL3my_Z26qwHR.webp 640w, https://briansunter.com/_astro/Screenshot_2023-09-27_at_1.28.29_PM_1695857318835_0.CFIsL3my_Z1ysen9.webp 750w, https://briansunter.com/_astro/Screenshot_2023-09-27_at_1.28.29_PM_1695857318835_0.CFIsL3my_1EcOEL.webp 828w, https://briansunter.com/_astro/Screenshot_2023-09-27_at_1.28.29_PM_1695857318835_0.CFIsL3my_fFeAh.webp 1080w, https://briansunter.com/_astro/Screenshot_2023-09-27_at_1.28.29_PM_1695857318835_0.CFIsL3my_Z1G8rLl.webp 1280w, https://briansunter.com/_astro/Screenshot_2023-09-27_at_1.28.29_PM_1695857318835_0.CFIsL3my_1nR21u.webp 1668w, https://briansunter.com/_astro/Screenshot_2023-09-27_at_1.28.29_PM_1695857318835_0.CFIsL3my_Z1BuUsp.webp 2048w, https://briansunter.com/_astro/Screenshot_2023-09-27_at_1.28.29_PM_1695857318835_0.CFIsL3my_eH04R.webp 2560w, https://briansunter.com/_astro/Screenshot_2023-09-27_at_1.28.29_PM_1695857318835_0.CFIsL3my_137On7.webp 2724w&quot; /&gt;&lt;figcaption&gt;Screenshot 2023-09-27 at 1.28.29 PM&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;We can zoom in to see groupings and that similar articles are grouped.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Screenshot 2023-09-09 at 4.58.38 PM&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1734px) 1734px, 100vw&quot; width=&quot;1734&quot; height=&quot;1232&quot; src=&quot;https://briansunter.com/_astro/Screenshot_2023-09-09_at_4.58.38_PM_1695860029294_0.Mq70qdqx_Z1SvlzM.webp&quot; srcset=&quot;https://briansunter.com/_astro/Screenshot_2023-09-09_at_4.58.38_PM_1695860029294_0.Mq70qdqx_Z1lnBV4.webp 640w, https://briansunter.com/_astro/Screenshot_2023-09-09_at_4.58.38_PM_1695860029294_0.Mq70qdqx_OKWY6.webp 750w, https://briansunter.com/_astro/Screenshot_2023-09-09_at_4.58.38_PM_1695860029294_0.Mq70qdqx_23Yo6x.webp 828w, https://briansunter.com/_astro/Screenshot_2023-09-09_at_4.58.38_PM_1695860029294_0.Mq70qdqx_uce8m.webp 1080w, https://briansunter.com/_astro/Screenshot_2023-09-09_at_4.58.38_PM_1695860029294_0.Mq70qdqx_3Y6jC.webp 1280w, https://briansunter.com/_astro/Screenshot_2023-09-09_at_4.58.38_PM_1695860029294_0.Mq70qdqx_Z2f8uFh.webp 1668w, https://briansunter.com/_astro/Screenshot_2023-09-09_at_4.58.38_PM_1695860029294_0.Mq70qdqx_Z1SvlzM.webp 1734w&quot; /&gt;&lt;figcaption&gt;Screenshot 2023-09-09 at 4.58.38 PM&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The 3D space allows for more fluid categorizations, enabling articles to exist “between groups.” For example, the “Philosophy of Science” article is placed between a cluster of articles on science and a cluster of articles on philosophy.&lt;/p&gt;
&lt;p&gt;Subjectively, the groupings seem better and make more sense for the 3D view than 2D. Turning the embeddings into 3D points, rather than 2D preserves much more information about their relationships and creates better groupings&lt;/p&gt;
&lt;p&gt;&lt;video src=&quot;../../assets/videos/output.mp4&quot; muted&gt;&lt;/video&gt;&lt;/p&gt;
&lt;p&gt;Here’s what the 10k article graph looks like:&lt;/p&gt;
&lt;p&gt;&lt;video src=&quot;../../assets/videos/largesmall_1695859569049_0.mp4&quot; muted&gt;&lt;/video&gt;&lt;/p&gt;
&lt;h3&gt;Implications and Uses&lt;/h3&gt;
&lt;h4&gt;Dynamic Categorization&lt;/h4&gt;
&lt;p&gt;Organizing based on text embeddings allows for a dynamic, fluid way to categorize notes or articles. Unlike rigid folder structures, this method enables an article to belong to multiple overlapping or between categories.&lt;/p&gt;
&lt;p&gt;As new articles are added, all articles shift and reorganize themselves around the new articles, so no manual organization is necessary. It’s automatically organized based on the meaning of the content.&lt;/p&gt;
&lt;h4&gt;Discovery and Exploration&lt;/h4&gt;
&lt;p&gt;The 3D environment encourages users to explore information in a more engaging way, potentially leading to unexpected yet relevant findings.&lt;/p&gt;
&lt;p&gt;Since the associations and groupings are suggested by the machine and not formed manually, you’re more likely to discover unexpected links and connections between information.&lt;/p&gt;
&lt;h4&gt;Semantic Search&lt;/h4&gt;
&lt;p&gt;Text embeddings are also used to implement “Semantic Search,” which allows you to search for documents based on similarity instead of keywords.&lt;/p&gt;
&lt;p&gt;The 3D gives us an intuitive understanding of how search works; we could imagine the search term in 3D space, and the search results would be the closest articles to the search query.&lt;/p&gt;
&lt;h3&gt;Real-world Application&lt;/h3&gt;
&lt;p&gt;The primary focus of this experiment is Wikipedia. However, this method can extend to personal or corporate knowledge bases. It’s a unique alternative for exploring and discovering information.&lt;/p&gt;
&lt;p&gt;With the potential rise in popularity of devices such as Apple Vision, the importance of crafting 3D interfaces could surge significantly.&lt;/p&gt;
&lt;h3&gt;Example Python code&lt;/h3&gt;
&lt;p&gt;It’s straightforward to generate text embeddings and compare their similarity using Python. Here are some simplified examples so you can understand how the code works.&lt;/p&gt;
&lt;p&gt;Using the &lt;code&gt;all-MiniLM-L6-v2&lt;/code&gt; model, you can give it text up to ~500 words long, and it will generate a text embedding, an array of 384 floating point numbers.&lt;/p&gt;
&lt;h4&gt;Generate a text embedding&lt;/h4&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;python&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; sentence_transformers &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; SentenceTransformer&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;model &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; SentenceTransformer(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;all-MiniLM-L6-v2&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;text_to_embed&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;The quick brown fox jumped over the lazy dog.&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;embedding &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; model.encode(subdocs_contents)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(embeddings)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;## [ 4.63508442e-02  9.21483636e-02  4.07040417e-02, ...]&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h4&gt;Compare similarity&lt;/h4&gt;
&lt;p&gt;Comparing text with high similarity&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;python&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; sentence_transformers.util &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; cos_sim&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;similar_text &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &quot;The slow brown fox jumped over the lazy cat.&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;similar_embedding &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; model.encode(similar_text)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;similar_score &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; cos_sim(embedding, similar_embedding)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(similar_score)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;## .9036 similarity. very similar&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Comparing text with low similarity&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;python&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;not_similar_text&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;Text embeddings help computers understand text better.&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;not_similar_embedding &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; model.encode(not_similar_text)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;not_similar_score &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; cos_sim(embedding, not_similar_embedding)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(not_similar)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;## 0.0428 similary, not similar at all&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h4&gt;Turn embeddings into 2D or 3D points with UMAP&lt;/h4&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;python&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; umap &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; UMAP&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;## n_components=3 gives us 3D points, =2 gives 2D points&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;xyz_points &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; UMAP(&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;n_components&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;3&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;).fit_transform(all_embeddings)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(xyz_points)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;## returns array of (x y z) coordinates, a 3d point for each piece of text&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;## [[0.3434,0.543, 0.0083],...]&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h4&gt;Conclusion&lt;/h4&gt;
&lt;p&gt;The experiment shows the potential of combining text embeddings with 3D interfaces for information management. It not only simplifies the organization but also enriches the exploration experience.&lt;/p&gt;
&lt;p&gt;As we continue to generate and consume more information, self-organizing approaches will be key to managing this ever-growing digital world.&lt;/p&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Wikipedia 3D Embeddings</title><link>https://briansunter.com/projects/wikipedia-3d-embeddings</link><guid isPermaLink="true">https://briansunter.com/projects/wikipedia-3d-embeddings</guid><description>Embed thousands of Wikipedia articles, project them into 3D with UMAP, and fly through the result in the browser. Articles cluster by what they&apos;re about, not by what folder they live in.</description><pubDate>Sun, 27 Aug 2023 03:06:29 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/wikipedia-3d-embeddings-hero.DlMa9D6O_1to17S.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;This started as an experiment in self-organising knowledge: instead of categorising Wikipedia articles by hand, embed them with a sentence-transformer, run UMAP to drop the high-dimensional vectors into 3D, and render the result with Three.js. Articles end up positioned by meaning. The planets and astronomy stuff sits in one cloud, the World War II stuff sits in another, and you can fly through it in the browser.&lt;/p&gt;
&lt;h2&gt;Features&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Renders 1,000 or 10,000 Wikipedia articles in 3D&lt;/li&gt;
&lt;li&gt;No manual categorisation. Positions come from the embedding model.&lt;/li&gt;
&lt;li&gt;Pan, rotate, zoom&lt;/li&gt;
&lt;li&gt;Articles colored by region of the cloud to make groupings legible&lt;/li&gt;
&lt;li&gt;Distance-based label sizing and billboarding so labels don’t pile up&lt;/li&gt;
&lt;li&gt;Pure browser rendering with Three.js&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Technology Stack&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Python pipeline:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;sentence-transformers&lt;/code&gt; (all-MiniLM-L6-v2) for embeddings&lt;/li&gt;
&lt;li&gt;UMAP for the 384D → 3D reduction&lt;/li&gt;
&lt;li&gt;Wikipedia API for article text&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Frontend:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Three.js&lt;/li&gt;
&lt;li&gt;WebGL&lt;/li&gt;
&lt;li&gt;Canvas-based label rendering&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;How It Works&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Embed&lt;/strong&gt;: each article is turned into a 384-D vector via a sentence-transformer&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Reduce&lt;/strong&gt;: UMAP collapses 384 dimensions to 3 while preserving local structure&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Render&lt;/strong&gt;: articles are placed at the resulting (x, y, z) coordinates in a Three.js scene&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Explore&lt;/strong&gt;: you fly around with mouse and keyboard&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Notes&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Articles can sit between categories; nothing forces a single tag.&lt;/li&gt;
&lt;li&gt;Adding new articles re-positions the cloud. The layout is emergent, not pre-baked.&lt;/li&gt;
&lt;li&gt;Some of the unexpected adjacencies (biology articles next to chemistry, certain historical figures clustered by era rather than nationality) are more interesting than the categorical groupings I’d have written by hand.&lt;/li&gt;
&lt;li&gt;3D preserves more of the original neighbourhood structure than 2D, which matters once the data set gets big.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;The Dataset&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Wikipedia:Vital_articles&quot;&gt;Wikipedia’s Vital Articles&lt;/a&gt;, in two sizes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;1K&lt;/strong&gt;: Level 3 vital articles (essential topics)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;10K&lt;/strong&gt;: Level 4 vital articles (broader coverage)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Articles are split into 500-word chunks and the chunk embeddings averaged per article, so each point represents a single article’s “average meaning.”&lt;/p&gt;
&lt;h2&gt;Demo &amp;amp; Code&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://briansunter.github.io/wikipedia-3d-embeddings/&quot;&gt;Live Demo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/briansunter/wikipedia-3d-embeddings&quot;&gt;Source Code&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Analyzing Coffee with Data Science + ChatGPT Code Interpreter</title><link>https://briansunter.com/newsletter/issue-13</link><guid isPermaLink="true">https://briansunter.com/newsletter/issue-13</guid><description>Uploading a dataset about coffee and using ChatGPT to automatically clean the data, understand insights, and generate cool charts.</description><pubDate>Thu, 27 Jul 2023 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/coffee_quality_by_country_boxplot.DcWVp3OT_ZcCU5Q.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;p&gt;One of my favorite new features of &lt;a href=&quot;https://chat.openai.com/&quot;&gt;ChatGPT&lt;/a&gt; is the “&lt;a href=&quot;https://openai.com/blog/chatgpt-plugins#code-interpreter&quot;&gt;code interpreter&lt;/a&gt;,” which allows ChatGPT to execute code and read data files you upload.&lt;/p&gt;
&lt;p&gt;You can upload a data file, then ask ChatGPT questions, and ChatGPT will write code to analyze the data and create visualizations based on your questions. You get charts out of data with very little effort.&lt;/p&gt;
&lt;p&gt;What’s interesting is that ChatGPT will look at the structure of your data, automatically clean it, and decide how to analyze it.&lt;/p&gt;
&lt;p&gt;I found an interesting dataset on Kaggle called &lt;a href=&quot;https://www.kaggle.com/datasets/fatihb/coffee-quality-data-cqi&quot;&gt;“Coffee Quality Data”&lt;/a&gt;. It contains coffee reviews from the Coffee Quality Institute (CQI), with 100-point scores, along with information about the coffee, such as its country of origin, altitude, preparation method, and variety, and information about its flavor profile, such as acidity and sweetness.&lt;/p&gt;
&lt;p&gt;I’m interested in examining this dataset to answer questions like: “Which countries produce the best coffee?” and “What are the differences in flavor profiles between countries and preparation methods?”&lt;/p&gt;
&lt;h3&gt;Loading and Cleaning Data&lt;/h3&gt;
&lt;p&gt;One of my favorite features of the ChatGPT code interpreter is its ability to clean data and do a preliminary analysis quickly.&lt;/p&gt;
&lt;p&gt;The coffee dataset is of decent quality but has some issues, like missing data, poorly formatted altitude values, and varied processing method names. This is usually a manual, laborious process and is inconvenient for quick exploratory analysis. The ChatGPT code interpreter automatically detects the important columns and cleans up common problems without being asked.&lt;/p&gt;
&lt;p&gt;It starts by loading the dataset and printing it to discover the most important columns of data.&lt;/p&gt;
&lt;h4&gt;Load, print, and preliminary analysis&lt;/h4&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;python&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;## First, let&apos;s load and inspect the dataset&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; pandas &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;as&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; pd&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;## Load the data&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;df &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; pd.read_csv(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;/mnt/data/df_arabica_clean.csv&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;## Display the first few rows of the dataframe&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;df.head()&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;blockquote&gt;
&lt;p&gt;The dataset contains 41 columns and 207 coffee samples. Here are a few key ones:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Country of Origin&lt;/strong&gt;: The country where the coffee bean was grown.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Farm Name&lt;/strong&gt;: The name of the coffee farm.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Altitude&lt;/strong&gt;: The altitude at which the coffee was grown.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Region&lt;/strong&gt;: The region where the coffee was grown.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Processing Method&lt;/strong&gt;: The method used to process the coffee beans.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Variety&lt;/strong&gt;: The coffee variety (e.g., Gesha, Typica, Bourbon).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Aroma, Flavor, Aftertaste, Acidity, Body, Balance, Uniformity, Clean Cup, Sweetness, Overall&lt;/strong&gt;: Scores given to the coffee on various attributes by professional cuppers.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Total Cup Points&lt;/strong&gt;: The overall quality score (our target variable).&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Our target variable is &lt;code&gt;Total Cup Points&lt;/code&gt; as we are trying to find out what makes the best coffee. The higher the total cup points, the better the coffee is considered to be.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;For our analysis, we’ll mainly focus on the factors that might affect coffee quality, such as Country of Origin, Variety, Processing Method, Altitude, and sensory profiles (Aroma, Flavor, Aftertaste, Acidity, Body, Balance).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h4&gt;Missing Values&lt;/h4&gt;
&lt;p&gt;It checks for missing values and decides how to handle them.&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;python&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;## Descriptive statistics&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;desc_stats &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; df.describe(&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;include&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;all&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;## Checking for missing values&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;missing_values &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; df.isnull().sum()&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;desc_stats, missing_values&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;blockquote&gt;
&lt;p&gt;The dataset has minimal missing values:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Variety: 6 missing values&lt;/li&gt;
&lt;li&gt;Processing Method: 5 missing values&lt;/li&gt;
&lt;li&gt;Altitude: 1 missing value&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;For this relatively clean dataset, rows with missing values in key analysis columns can be excluded when analyzing those specific features.&lt;/p&gt;
&lt;h3&gt;Analyzing Data&lt;/h3&gt;
&lt;p&gt;It starts with a quick analysis to show the distribution of the most important data points.&lt;/p&gt;
&lt;h4&gt;Distribution of Ratings&lt;/h4&gt;
&lt;blockquote&gt;
&lt;p&gt;The histogram shows the distribution of the total cup points, representing the coffee’s overall quality. The distribution is approximately normal with scores ranging from 78 to 89 points. The mean score is 83.7, indicating that most coffees in this dataset are of good specialty-grade quality.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;figure&gt;&lt;img alt=&quot;coffee distribution&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1477px) 1477px, 100vw&quot; width=&quot;1477&quot; height=&quot;876&quot; src=&quot;https://briansunter.com/_astro/coffee_distribution.CJzqm_Rn_Z25icEr.webp&quot; srcset=&quot;https://briansunter.com/_astro/coffee_distribution.CJzqm_Rn_Z2yUeD.webp 640w, https://briansunter.com/_astro/coffee_distribution.CJzqm_Rn_Z1D1C57.webp 750w, https://briansunter.com/_astro/coffee_distribution.CJzqm_Rn_2njdjg.webp 828w, https://briansunter.com/_astro/coffee_distribution.CJzqm_Rn_Z6fedU.webp 1080w, https://briansunter.com/_astro/coffee_distribution.CJzqm_Rn_WJ1e0.webp 1280w, https://briansunter.com/_astro/coffee_distribution.CJzqm_Rn_Z25icEr.webp 1477w&quot; /&gt;&lt;figcaption&gt;coffee distribution&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h4&gt;Initial Analysis&lt;/h4&gt;
&lt;p&gt;Next, ChatGPT does a more detailed analysis by automatically graphing what it thinks are the most important pieces of data.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Let’s examine the relationships between coffee quality (&lt;code&gt;Total Cup Points&lt;/code&gt;) and some potentially influential factors (&lt;code&gt;Country of Origin&lt;/code&gt;, &lt;code&gt;Variety&lt;/code&gt;, &lt;code&gt;Processing Method&lt;/code&gt;, &lt;code&gt;Altitude&lt;/code&gt;, and sensory profiles). We will use box plots and bar charts to visualize these relationships.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;The visualizations suggest that:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The highest average coffee quality comes from Ethiopia, Tanzania, Taiwan, and Guatemala.&lt;/li&gt;
&lt;li&gt;The Gesha variety and SL34 are associated with superior coffee quality.&lt;/li&gt;
&lt;li&gt;Washed/Wet processing is the most common method, while Natural/Dry shows slightly higher median quality.&lt;/li&gt;
&lt;li&gt;Higher altitudes (1600m+) tend to produce slightly higher quality coffee.&lt;/li&gt;
&lt;li&gt;Flavor and Aftertaste scores have a strong positive correlation with overall coffee quality.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Loading Data and Removing Outliers&lt;/h3&gt;
&lt;p&gt;The graph above was generated by this code, written by ChatGPT:&lt;/p&gt;
&lt;p&gt;The first part loads the data and handles altitude parsing:&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;python&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; pandas &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;as&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; pd&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; numpy &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;as&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; np&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;df &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; pd.read_csv(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;/mnt/data/df_arabica_clean.csv&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;## Parse altitude - extract numeric values from ranges like &quot;1700-1930&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;def&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; parse_altitude&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(alt):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;    if&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; pd.isna(alt):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;        return&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; np.nan&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    alt_str &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; str&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(alt)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;    if&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &apos;-&apos;&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; in&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; alt_str:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;        parts &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; alt_str.split(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;-&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;        try&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;            return&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;float&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(parts[&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;]) &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; float&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(parts[&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;])) &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 2&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;        except&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;            pass&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;    try&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;        return&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; float&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(alt_str.replace(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;,&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;).replace(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;m&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;).strip())&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;    except&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;        return&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; np.nan&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;df[&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;Altitude_Numeric&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;] &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; df[&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;Altitude&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;].apply(parse_altitude)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;## Calculate the mean Total Cup Points for each category and sort in descending order&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;top_countries_mean &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; df.groupby(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;Country of Origin&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;)[&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;Total Cup Points&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;].mean().sort_values(&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;ascending&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;False&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;).index[:&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;10&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;top_varieties_mean &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; df.groupby(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;Variety&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;)[&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;Total Cup Points&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;].mean().sort_values(&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;ascending&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;False&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;).index[:&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;8&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;## Get processing method means&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;df_method_mean &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; df.groupby(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;Processing Method&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;)[&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;Total Cup Points&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;].mean().sort_values(&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;ascending&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;False&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3&gt;Generating Charts with Matplotlib and seaborn&lt;/h3&gt;
&lt;p&gt;The second part of the code generates the charts:&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;python&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; matplotlib.pyplot &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;as&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; plt&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; seaborn &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;as&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; sns&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;## Set up the figure size&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;plt.figure(&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;figsize&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;12&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;8&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;))&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;## Box plot for Country of Origin&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;sns.boxplot(&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;data&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;df[df[&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;Country of Origin&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;].isin(top_countries_mean)],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;            y&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;Country of Origin&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;x&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;Total Cup Points&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;            order&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;top_countries_mean)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;plt.title(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;Coffee Quality by Country of Origin&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;plt.xlim(&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;78&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;90&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;plt.tight_layout()&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;plt.show()&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3&gt;Visualizations&lt;/h3&gt;
&lt;p&gt;I continued asking it questions to generate visualizations, such as “Generate a bar chart for top mean cup scores by country, sorted in descending order.”&lt;/p&gt;
&lt;p&gt;Here are some of my favorite visualizations:&lt;/p&gt;
&lt;h3&gt;Coffee Quality by Country&lt;/h3&gt;
&lt;figure&gt;&lt;img alt=&quot;coffee quality by country bar&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1776px) 1776px, 100vw&quot; width=&quot;1776&quot; height=&quot;1176&quot; src=&quot;https://briansunter.com/_astro/coffee_quality_by_country_bar.B-yc0hgX_uqtKJ.webp&quot; srcset=&quot;https://briansunter.com/_astro/coffee_quality_by_country_bar.B-yc0hgX_q6FDO.webp 640w, https://briansunter.com/_astro/coffee_quality_by_country_bar.B-yc0hgX_1sWhUe.webp 750w, https://briansunter.com/_astro/coffee_quality_by_country_bar.B-yc0hgX_Z2k7Hd4.webp 828w, https://briansunter.com/_astro/coffee_quality_by_country_bar.B-yc0hgX_Z1V3Ram.webp 1080w, https://briansunter.com/_astro/coffee_quality_by_country_bar.B-yc0hgX_1SH5sm.webp 1280w, https://briansunter.com/_astro/coffee_quality_by_country_bar.B-yc0hgX_Z2bbsMV.webp 1668w, https://briansunter.com/_astro/coffee_quality_by_country_bar.B-yc0hgX_uqtKJ.webp 1776w&quot; /&gt;&lt;figcaption&gt;coffee quality by country bar&lt;/figcaption&gt;&lt;/figure&gt;
&lt;figure&gt;&lt;img alt=&quot;coffee quality by country boxplot&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1776px) 1776px, 100vw&quot; width=&quot;1776&quot; height=&quot;1176&quot; src=&quot;https://briansunter.com/_astro/coffee_quality_by_country_boxplot.DcWVp3OT_ZWubvN.webp&quot; srcset=&quot;https://briansunter.com/_astro/coffee_quality_by_country_boxplot.DcWVp3OT_ZMk6Nk.webp 640w, https://briansunter.com/_astro/coffee_quality_by_country_boxplot.DcWVp3OT_1y7d8a.webp 750w, https://briansunter.com/_astro/coffee_quality_by_country_boxplot.DcWVp3OT_20ACTv.webp 828w, https://briansunter.com/_astro/coffee_quality_by_country_boxplot.DcWVp3OT_22LUie.webp 1080w, https://briansunter.com/_astro/coffee_quality_by_country_boxplot.DcWVp3OT_2iJ9NL.webp 1280w, https://briansunter.com/_astro/coffee_quality_by_country_boxplot.DcWVp3OT_Z1NWn3G.webp 1668w, https://briansunter.com/_astro/coffee_quality_by_country_boxplot.DcWVp3OT_ZWubvN.webp 1776w&quot; /&gt;&lt;figcaption&gt;coffee quality by country boxplot&lt;/figcaption&gt;&lt;/figure&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Ethiopia&lt;/strong&gt; has the highest average quality score (84.96). If you’ve had Ethiopian coffee, you know the fruity and floral notes.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Tanzania&lt;/strong&gt; is close behind (84.74), with bright, complex cups.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Taiwan&lt;/strong&gt; scored well (84.35) across a big sample (61 coffees). I didn’t expect Taiwan to show up this high.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Guatemala&lt;/strong&gt; (84.30) is consistent, with good acidity.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Coffee Quality by Variety&lt;/h3&gt;
&lt;figure&gt;&lt;img alt=&quot;coffee quality by variety bar&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1771px) 1771px, 100vw&quot; width=&quot;1771&quot; height=&quot;1176&quot; src=&quot;https://briansunter.com/_astro/coffee_quality_by_variety_bar.DG4ORvzZ_1XPJ5V.webp&quot; srcset=&quot;https://briansunter.com/_astro/coffee_quality_by_variety_bar.DG4ORvzZ_Z15tQro.webp 640w, https://briansunter.com/_astro/coffee_quality_by_variety_bar.DG4ORvzZ_Z2DfaY.webp 750w, https://briansunter.com/_astro/coffee_quality_by_variety_bar.DG4ORvzZ_1eeJ1i.webp 828w, https://briansunter.com/_astro/coffee_quality_by_variety_bar.DG4ORvzZ_ZUamds.webp 1080w, https://briansunter.com/_astro/coffee_quality_by_variety_bar.DG4ORvzZ_tIJJY.webp 1280w, https://briansunter.com/_astro/coffee_quality_by_variety_bar.DG4ORvzZ_Z1D93bL.webp 1668w, https://briansunter.com/_astro/coffee_quality_by_variety_bar.DG4ORvzZ_1XPJ5V.webp 1771w&quot; /&gt;&lt;figcaption&gt;coffee quality by variety bar&lt;/figcaption&gt;&lt;/figure&gt;
&lt;figure&gt;&lt;img alt=&quot;coffee quality by variety boxplot&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1776px) 1776px, 100vw&quot; width=&quot;1776&quot; height=&quot;1176&quot; src=&quot;https://briansunter.com/_astro/coffee_quality_by_variety_boxplot.DJjahXPT_254iTw.webp&quot; srcset=&quot;https://briansunter.com/_astro/coffee_quality_by_variety_boxplot.DJjahXPT_Z1vmUr1.webp 640w, https://briansunter.com/_astro/coffee_quality_by_variety_boxplot.DJjahXPT_P4out.webp 750w, https://briansunter.com/_astro/coffee_quality_by_variety_boxplot.DJjahXPT_1hxOgO.webp 828w, https://briansunter.com/_astro/coffee_quality_by_variety_boxplot.DJjahXPT_9gTC.webp 1080w, https://briansunter.com/_astro/coffee_quality_by_variety_boxplot.DJjahXPT_g6vqa.webp 1280w, https://briansunter.com/_astro/coffee_quality_by_variety_boxplot.DJjahXPT_1dB7mD.webp 1668w, https://briansunter.com/_astro/coffee_quality_by_variety_boxplot.DJjahXPT_254iTw.webp 1776w&quot; /&gt;&lt;figcaption&gt;coffee quality by variety boxplot&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The variety rankings:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Gesha&lt;/strong&gt; (also spelled Geisha) has the highest average score (85.43). It’s the expensive one for a reason: jasmine and bergamot notes.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;SL34&lt;/strong&gt; scored 84.94. It’s a Kenyan variety with complex fruit flavors.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Ethiopian Heirlooms&lt;/strong&gt; scored 84.70, though this bucket covers a lot of different indigenous varieties.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Typica&lt;/strong&gt; and &lt;strong&gt;Bourbon&lt;/strong&gt; are solid and consistent.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Coffee Quality by Altitude Range&lt;/h3&gt;
&lt;p&gt;Higher altitudes generally produce better coffee. The cherries develop more slowly at altitude, which seems to produce more complex flavors.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;coffee quality by altitude&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1776px) 1776px, 100vw&quot; width=&quot;1776&quot; height=&quot;877&quot; src=&quot;https://briansunter.com/_astro/coffee_quality_by_altitude.BtT4sm6t_ZKyzaD.webp&quot; srcset=&quot;https://briansunter.com/_astro/coffee_quality_by_altitude.BtT4sm6t_ZmcAgF.webp 640w, https://briansunter.com/_astro/coffee_quality_by_altitude.BtT4sm6t_14DdSS.webp 750w, https://briansunter.com/_astro/coffee_quality_by_altitude.BtT4sm6t_Z18yKpm.webp 828w, https://briansunter.com/_astro/coffee_quality_by_altitude.BtT4sm6t_ZafvAJ.webp 1080w, https://briansunter.com/_astro/coffee_quality_by_altitude.BtT4sm6t_1mQw99.webp 1280w, https://briansunter.com/_astro/coffee_quality_by_altitude.BtT4sm6t_Z13Y3wh.webp 1668w, https://briansunter.com/_astro/coffee_quality_by_altitude.BtT4sm6t_ZKyzaD.webp 1776w&quot; /&gt;&lt;figcaption&gt;coffee quality by altitude&lt;/figcaption&gt;&lt;/figure&gt;
&lt;ul&gt;
&lt;li&gt;Coffee grown at &lt;strong&gt;1800m+&lt;/strong&gt; has the highest median quality&lt;/li&gt;
&lt;li&gt;There’s a general trend of increasing quality with altitude&lt;/li&gt;
&lt;li&gt;The effect isn’t dramatic, but it’s there across the dataset&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Quality by Processing Method&lt;/h3&gt;
&lt;p&gt;What are processing methods? These are how the beans are dried and prepared before roasting.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Washed / Wet&lt;/strong&gt;: Beans are de-pulped, fermented, and thoroughly washed of all mucilage. This method typically yields coffee with more pronounced acidity and cleaner flavors due to removing all fruit before drying.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Natural / Dry&lt;/strong&gt;: The cherries are picked and spread out in the sun to dry, allowing the fruit to ferment before the seed is removed naturally. The coffee retains intense, fruity flavors from the cherry.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Honey / Pulped Natural&lt;/strong&gt;: This technique involves removing the skin of the coffee cherries but leaving some of the fruity pulp on the seeds when drying. The name ‘honey’ refers to the sticky texture as it dries, not the taste.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Anaerobic&lt;/strong&gt;: A newer experimental method where beans ferment in oxygen-free environments, creating unique and often intense flavor profiles.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;coffee quality by processing&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1776px) 1776px, 100vw&quot; width=&quot;1776&quot; height=&quot;877&quot; src=&quot;https://briansunter.com/_astro/coffee_quality_by_processing.BiRYhwCS_SQa8S.webp&quot; srcset=&quot;https://briansunter.com/_astro/coffee_quality_by_processing.BiRYhwCS_1IY6iu.webp 640w, https://briansunter.com/_astro/coffee_quality_by_processing.BiRYhwCS_Z1n6WY9.webp 750w, https://briansunter.com/_astro/coffee_quality_by_processing.BiRYhwCS_3sYhy.webp 828w, https://briansunter.com/_astro/coffee_quality_by_processing.BiRYhwCS_BiYWA.webp 1080w, https://briansunter.com/_astro/coffee_quality_by_processing.BiRYhwCS_ZgJSa4.webp 1280w, https://briansunter.com/_astro/coffee_quality_by_processing.BiRYhwCS_2q4bVS.webp 1668w, https://briansunter.com/_astro/coffee_quality_by_processing.BiRYhwCS_SQa8S.webp 1776w&quot; /&gt;&lt;figcaption&gt;coffee quality by processing&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;By the numbers:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Natural/Dry&lt;/strong&gt; processing has the highest median quality (84.0) among the common methods&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Washed/Wet&lt;/strong&gt; is the most common method (124 samples) with consistent quality&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Honey/Pulped Natural&lt;/strong&gt; sits between washed and natural: some clarity, some fruitiness&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Anaerobic&lt;/strong&gt; is interesting but there’s barely any data (n=1-2), so I wouldn’t read too much into it&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Flavor Profile by Country&lt;/h3&gt;
&lt;p&gt;How different countries compare on different flavor profiles, such as sweetness and acidity.&lt;/p&gt;
&lt;p&gt;This uses an interesting chart called a “Radar Chart” to visualize multiple sensory dimensions simultaneously.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;coffee radar top4&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1455px) 1455px, 100vw&quot; width=&quot;1455&quot; height=&quot;1184&quot; src=&quot;https://briansunter.com/_astro/coffee_radar_top4.BR2LQNQp_ZrF5od.webp&quot; srcset=&quot;https://briansunter.com/_astro/coffee_radar_top4.BR2LQNQp_wHcHj.webp 640w, https://briansunter.com/_astro/coffee_radar_top4.BR2LQNQp_2qdYNS.webp 750w, https://briansunter.com/_astro/coffee_radar_top4.BR2LQNQp_Z24uFo1.webp 828w, https://briansunter.com/_astro/coffee_radar_top4.BR2LQNQp_Zovw3u.webp 1080w, https://briansunter.com/_astro/coffee_radar_top4.BR2LQNQp_2hGDo9.webp 1280w, https://briansunter.com/_astro/coffee_radar_top4.BR2LQNQp_ZrF5od.webp 1455w&quot; /&gt;&lt;figcaption&gt;coffee radar top4&lt;/figcaption&gt;&lt;/figure&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Ethiopian&lt;/strong&gt; coffees are highest in Acidity (8.02) and Flavor (7.87)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Tanzanian&lt;/strong&gt; coffees have the highest Aroma scores (7.90)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Taiwanese&lt;/strong&gt; coffees are pretty balanced across all attributes&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Guatemalan&lt;/strong&gt; coffees have strong Flavor scores (7.88)&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Sensory Attribute Correlations&lt;/h3&gt;
&lt;p&gt;Which sensory attributes matter most for the overall quality score:&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;coffee correlation&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1307px) 1307px, 100vw&quot; width=&quot;1307&quot; height=&quot;1177&quot; src=&quot;https://briansunter.com/_astro/coffee_correlation.DRJOV5-C_1iyxxV.webp&quot; srcset=&quot;https://briansunter.com/_astro/coffee_correlation.DRJOV5-C_Z1KCHkH.webp 640w, https://briansunter.com/_astro/coffee_correlation.DRJOV5-C_2APTp.webp 750w, https://briansunter.com/_astro/coffee_correlation.DRJOV5-C_2ccMkg.webp 828w, https://briansunter.com/_astro/coffee_correlation.DRJOV5-C_1mLYLQ.webp 1080w, https://briansunter.com/_astro/coffee_correlation.DRJOV5-C_1i8EdO.webp 1280w, https://briansunter.com/_astro/coffee_correlation.DRJOV5-C_1iyxxV.webp 1307w&quot; /&gt;&lt;figcaption&gt;coffee correlation&lt;/figcaption&gt;&lt;/figure&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Overall&lt;/strong&gt; rating correlates most strongly (0.95) with Total Cup Points, then &lt;strong&gt;Flavor&lt;/strong&gt; (0.94)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Aftertaste&lt;/strong&gt; and &lt;strong&gt;Balance&lt;/strong&gt; are close behind (0.93)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Aroma&lt;/strong&gt; has a strong influence too (0.87)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Uniformity&lt;/strong&gt;, &lt;strong&gt;Clean Cup&lt;/strong&gt;, and &lt;strong&gt;Sweetness&lt;/strong&gt; are near-perfect for most samples, so they don’t tell you much about quality differences&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;I’ve been using the ChatGPT code interpreter a lot for exploratory data analysis, and it’s been useful.&lt;/p&gt;
&lt;p&gt;The result that surprised me most was Taiwan. I don’t think of it as a major coffee origin, but it scored 84.35 across 61 samples, which is a real signal, not noise. The correlation data was less surprising: Flavor and Aftertaste drive the overall score, while Uniformity and Sweetness are basically table stakes at the specialty level.&lt;/p&gt;
&lt;p&gt;ChatGPT handled almost all the data cleaning and chart code automatically. I just uploaded the CSV and asked questions.&lt;/p&gt;
&lt;p&gt;The main limitation right now is that the Code Interpreter only has a handful of preinstalled libraries. Once it can install and run anything, this gets a lot more powerful.&lt;/p&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Chunk Audio</title><link>https://briansunter.com/projects/chunk-audio</link><guid isPermaLink="true">https://briansunter.com/projects/chunk-audio</guid><description>Chunk long-form audio into manageable segments for easier review, search, and reuse.</description><pubDate>Sat, 22 Jul 2023 01:55:35 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/chunk-audio-hero.BtFKmBI0_5eT6t.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;Chunk Audio is a utility project focused on breaking longer audio files into smaller chunks so they are easier to process, inspect, and work with downstream.&lt;/p&gt;
&lt;h2&gt;Why I Built It&lt;/h2&gt;
&lt;p&gt;When working with long recordings, it’s often faster to split source audio into predictable segments before transcription, analysis, or editing. Chunk Audio packages that workflow into a single repository.&lt;/p&gt;
&lt;h2&gt;Use Cases&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Preparing long recordings for transcription pipelines&lt;/li&gt;
&lt;li&gt;Creating smaller files for iterative AI processing&lt;/li&gt;
&lt;li&gt;Simplifying manual review of large audio sources&lt;/li&gt;
&lt;li&gt;Building repeatable batch workflows for audio preprocessing&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Repository&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;GitHub: &lt;a href=&quot;https://github.com/briansunter/chunk-audio&quot;&gt;https://github.com/briansunter/chunk-audio&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>GPT-4 and ChatGPT in the Logseq OpenAI Plugin</title><link>https://briansunter.com/newsletter/issue-12</link><guid isPermaLink="true">https://briansunter.com/newsletter/issue-12</guid><description>Adding GPT-4 and ChatGPT to my Logseq OpenAI plugin, comparing usage costs, and looking at the best new features of GPT-4</description><pubDate>Wed, 15 Mar 2023 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/Screenshot_2023-03-14_at_3.01.45_PM_1678842139677_0.DyRoiMip_s8meT.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;GPT-4 Announcement&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://openai.com/research/gpt-4&quot;&gt;OpenAI just released a new AI model&lt;/a&gt;, GPT-4, which I recently integrated into my &lt;a href=&quot;https://github.com/briansunter/logseq-plugin-gpt3-openai&quot;&gt;Logseq OpenAI plugin&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I’ve been testing GPT-4, and the results are really impressive. It gives much more nuanced and detailed answers than earlier models.&lt;/p&gt;
&lt;p&gt;In my tests, it’s capable of more complex tasks that weren’t possible before.&lt;/p&gt;
&lt;p&gt;A notable improvement is the new GPT-4 model has a much greater “context length,” which was a massive limitation of earlier models.&lt;/p&gt;
&lt;p&gt;The “context length” controls how much text input and instructions the model can understand and how much text it can generate.&lt;/p&gt;
&lt;p&gt;In earlier models, you were limited to around six pages of input and output text. Now, you can generate and analyze 50 pages of text.&lt;/p&gt;
&lt;p&gt;This opens up so many new possibilities, such as feeding entire research papers or legal cases in and answering questions about them or generating a 50-page film screenplay.&lt;/p&gt;
&lt;p&gt;Not only is the model “smarter” in general, but feeding in a ton of additional context and instructions makes it much, much more capable.&lt;/p&gt;
&lt;h2&gt;OpenAI GPT-4 Demo&lt;/h2&gt;
&lt;p&gt;In &lt;a href=&quot;https://openai.com/research/gpt-4&quot;&gt;OpenAI’s examples&lt;/a&gt;, they show it taking many human standardized tests like the AP Chemistry test and Bar Exam (that lawyers need to pass to practice law)&lt;/p&gt;
&lt;p&gt;GPT-4 passes the bar exam with a score around the top 10% of test takers; in contrast, GPT-3.5 (ChatGPT), released ~3 months ago, had a score in the bottom 10%.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Screenshot 2023-03-14 at 3.01.45 PM&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 858px) 858px, 100vw&quot; width=&quot;858&quot; height=&quot;601&quot; src=&quot;https://briansunter.com/_astro/Screenshot_2023-03-14_at_3.01.45_PM_1678842139677_0.DyRoiMip_Z2gwuRC.webp&quot; srcset=&quot;https://briansunter.com/_astro/Screenshot_2023-03-14_at_3.01.45_PM_1678842139677_0.DyRoiMip_ZeFD4X.webp 640w, https://briansunter.com/_astro/Screenshot_2023-03-14_at_3.01.45_PM_1678842139677_0.DyRoiMip_ZreNVG.webp 750w, https://briansunter.com/_astro/Screenshot_2023-03-14_at_3.01.45_PM_1678842139677_0.DyRoiMip_ZVKIVy.webp 828w, https://briansunter.com/_astro/Screenshot_2023-03-14_at_3.01.45_PM_1678842139677_0.DyRoiMip_Z2gwuRC.webp 858w&quot; /&gt;&lt;figcaption&gt;Screenshot 2023-03-14 at 3.01.45 PM&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Another notable feature is that GPT-4 is “multimodal,” meaning it can understand images as well as text.&lt;/p&gt;
&lt;p&gt;In one of their demos, they drew a napkin sketch of a website, and GPT-4 turned it into a working website.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Write brief HTML/JS to turn this mock-up into a colorful website, where the jokes are replaced by two real jokes&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Below is a hand-drawn image he uploaded from his notebook.&lt;/p&gt;
&lt;p&gt;It’s for a joke website, where it shows a joke, and you push a button to reveal the punchline.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;image&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 920px) 920px, 100vw&quot; width=&quot;920&quot; height=&quot;1226&quot; src=&quot;https://briansunter.com/_astro/image_1678951021142_0.CzIVSc2A_Z1ThRca.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1678951021142_0.CzIVSc2A_1BObWv.webp 640w, https://briansunter.com/_astro/image_1678951021142_0.CzIVSc2A_fwIl7.webp 750w, https://briansunter.com/_astro/image_1678951021142_0.CzIVSc2A_Z1OeRdc.webp 828w, https://briansunter.com/_astro/image_1678951021142_0.CzIVSc2A_Z1ThRca.webp 920w&quot; /&gt;&lt;figcaption&gt;image&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;GPT-4 was able to completely code this website, including the content, styling, and code to reveal the punchline when you push the button.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;image&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 3068px) 3068px, 100vw&quot; width=&quot;3068&quot; height=&quot;2272&quot; src=&quot;https://briansunter.com/_astro/image_1678951039164_0.C1LId5Xk_2ama0H.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1678951039164_0.C1LId5Xk_Z1Eq3mu.webp 640w, https://briansunter.com/_astro/image_1678951039164_0.C1LId5Xk_Z1NDpMg.webp 750w, https://briansunter.com/_astro/image_1678951039164_0.C1LId5Xk_Z1GchMJ.webp 828w, https://briansunter.com/_astro/image_1678951039164_0.C1LId5Xk_ZPjKiq.webp 1080w, https://briansunter.com/_astro/image_1678951039164_0.C1LId5Xk_1C8WS0.webp 1280w, https://briansunter.com/_astro/image_1678951039164_0.C1LId5Xk_zopDM.webp 1668w, https://briansunter.com/_astro/image_1678951039164_0.C1LId5Xk_Z2tc5XU.webp 2048w, https://briansunter.com/_astro/image_1678951039164_0.C1LId5Xk_ZuEtcr.webp 2560w, https://briansunter.com/_astro/image_1678951039164_0.C1LId5Xk_2ama0H.webp 3068w&quot; /&gt;&lt;figcaption&gt;image&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Watch the full demo here:&lt;/p&gt;
&lt;iframe width=&quot;100%&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/outcGtbnMuQ&quot; frameborder=&quot;0&quot; loading=&quot;lazy&quot; allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen&gt;&lt;/iframe&gt;
&lt;h2&gt;GPT-4 in the Logseq OpenAI plugin&lt;/h2&gt;
&lt;p&gt;Generating plans and systems with GPT-4 and Logseq&lt;/p&gt;
&lt;p&gt;When testing the new API, I found GPT-4 could perform complex tasks that ChatGPT could not accomplish. Here’s one concrete example:&lt;/p&gt;
&lt;p&gt;One of my favorite features in Logseq is the repeating checkbox tasks. You can create a checkbox that repeats at specified intervals using Logseq-specific markdown syntax.&lt;/p&gt;
&lt;p&gt;Here’s an example of a task reminding you to tweet and the format in plain text.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Screenshot 2023-03-15 at 8.55.45 PM&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 399px) 399px, 100vw&quot; width=&quot;399&quot; height=&quot;87&quot; src=&quot;https://briansunter.com/_astro/Screenshot_2023-03-15_at_8.55.45_PM_1678949821181_0.BHlsg_9o_1cToB9.webp&quot; srcset=&quot;https://briansunter.com/_astro/Screenshot_2023-03-15_at_8.55.45_PM_1678949821181_0.BHlsg_9o_1cToB9.webp 399w&quot; /&gt;&lt;figcaption&gt;Screenshot 2023-03-15 at 8.55.45 PM&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;A checkbox appears in your notes when you write text in this format inside the Logseq Editor.&lt;/p&gt;
&lt;p&gt;When you click the checkbox, it reappears a day later. You can specify these tasks to repeat at any interval: weekly, bimonthly, yearly, etc.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Screenshot 2023-03-15 at 8.57.22 PM&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 399px) 399px, 100vw&quot; width=&quot;399&quot; height=&quot;87&quot; src=&quot;https://briansunter.com/_astro/Screenshot_2023-03-15_at_8.57.22_PM_1678949891765_0.CqqBt-eO_Z1IvosX.webp&quot; srcset=&quot;https://briansunter.com/_astro/Screenshot_2023-03-15_at_8.57.22_PM_1678949891765_0.CqqBt-eO_Z1IvosX.webp 399w&quot; /&gt;&lt;figcaption&gt;Screenshot 2023-03-15 at 8.57.22 PM&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;With GPT-4, you can give it one example of the Logseq task syntax, along with a command like “Create a plan for me to gain followers on Twitter using Logseq repeating tasks”, and it will generate a detailed plan of what tasks you need to do and how frequently you need to do them.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;image&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 680px) 680px, 100vw&quot; width=&quot;680&quot; height=&quot;374&quot; src=&quot;https://briansunter.com/_astro/image_1678950313589_0.D6YpvUFt_Z2vc0YC.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1678950313589_0.D6YpvUFt_ghCNB.webp 640w, https://briansunter.com/_astro/image_1678950313589_0.D6YpvUFt_Z2vc0YC.webp 680w&quot; /&gt;&lt;figcaption&gt;image&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;In this example, to gain Twitter followers, the AI suggests you tweet daily, reply to others daily, check your metrics weekly, share others’ content every other day, etc.&lt;/p&gt;
&lt;p&gt;So to gain followers, you need to execute the plan that the AI gave you, doing the task, checking the box, and doing it again when the task repeats itself at the interval the AI chose.&lt;/p&gt;
&lt;p&gt;When I gave the same task to ChatGPT, released just three months ago, it couldn’t do it.&lt;/p&gt;
&lt;p&gt;I’m fascinated by the idea of AI generating plans for humans to follow and acting as their personal assistant, and I want to explore this idea more in the future.&lt;/p&gt;
&lt;p&gt;In another example, I asked it to write me a college-style curriculum to learn AI in a year, and it did a beautiful job. My primary use case for AI is to self-study various subjects, and I’m excited about the possibilities AI opens up for self-directed learners.&lt;/p&gt;
&lt;h2&gt;ChatGPT API in the Logseq Plugin&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://openai.com/blog/introducing-chatgpt-and-whisper-apis&quot;&gt;OpenAI also recently released its ChatGPT API&lt;/a&gt;. Previously this was only available in the web app, but now they also provide an API to developers to build applications using it.&lt;/p&gt;
&lt;p&gt;I upgraded the Logseq OpenAI plugin to support this as well.&lt;/p&gt;
&lt;p&gt;The most notable thing about the ChatGPT API is its price. OpenAI has stated that it is 90% cheaper than other models, such as GPT-4 or GPT-3.&lt;/p&gt;
&lt;p&gt;Before, I was spending around $7 a month with moderate usage of GPT-3 for notetaking, but now I’m spending less than $1 per month using ChatGPT.&lt;/p&gt;
&lt;p&gt;Regarding the quality of answers, ChatGPT is less likely to make up information compared to regular GPT-3. For example, I tried asking regular GPT-3 to “Describe Yoda from Star Wars”. Regular GPT-3 often added made-up details, like describing him as having a “long pointed beard,” whereas ChatGPT consistently did tasks like this correctly. OpenAI has an example in their blog where they ask, “Tell me about when Christopher Columbus came to the US in 2015”. Regular GPT-3 will make up a story about Columbus arriving in 2015, but ChatGPT can recognize this question doesn’t make sense.&lt;/p&gt;
&lt;p&gt;Overall, the answers from ChatGPT are better than the regular GPT-3 model users of the &lt;a href=&quot;https://github.com/briansunter/logseq-plugin-gpt3-openai&quot;&gt;Logseq OpenAI GPT-3 plugin&lt;/a&gt; can expect to spend 90% less while still receiving quality results.&lt;/p&gt;
&lt;h2&gt;Should I use GPT-4 or ChatGPT&lt;/h2&gt;
&lt;p&gt;GPT-4 is much more expensive than ChatGPT.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://openai.com/pricing&quot;&gt;OpenAI’s pricing&lt;/a&gt; charges per 1000 “tokens,” where 1000 tokens are about 750 words&lt;/p&gt;
&lt;p&gt;These calculations will be in terms of words to make them easier to understand&lt;/p&gt;
&lt;p&gt;For reference, there are around 300 words per page in a paperback book.&lt;/p&gt;
&lt;h4&gt;GPT-4 Price&lt;/h4&gt;
&lt;p&gt;Input to GPT-4 costs $0.03 per 750 words.&lt;/p&gt;
&lt;p&gt;Generating text with GPT-4 costs $0.06 per 750 words.&lt;/p&gt;
&lt;p&gt;The average cost is $0.045 per 750 words, assuming roughly equal inputs and outputs&lt;/p&gt;
&lt;h4&gt;ChatGPT Price&lt;/h4&gt;
&lt;p&gt;Input and generation both cost $0.002 per 750 words.&lt;/p&gt;
&lt;h4&gt;GPT-3 (old)&lt;/h4&gt;
&lt;p&gt;Input and generation both cost $0.02 per 750 words.&lt;/p&gt;
&lt;p&gt;Here’s a breakdown of how much my moderate personal notetaking usage would cost monthly, assuming I analyze and generate an equal amount of text.&lt;/p&gt;
&lt;h3&gt;Total cost for my usage&lt;/h3&gt;
&lt;p&gt;According to the OpenAI dashboard, I use around 300k words per month.&lt;/p&gt;
&lt;p&gt;GPT-4 would cost me &lt;strong&gt;$18 per month&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;ChatGPT would cost me &lt;strong&gt;$0.8 per month&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;GPT-3 would cost me &lt;strong&gt;$8 per month&lt;/strong&gt;&lt;/p&gt;
&lt;h3&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;GPT-4 is &lt;strong&gt;~22x&lt;/strong&gt; more expensive than ChatGPT for my personal notetaking purposes&lt;/p&gt;
&lt;p&gt;If you generate much more text than you analyze, it’s potentially &lt;strong&gt;29x&lt;/strong&gt; more expensive.&lt;/p&gt;
&lt;p&gt;The unreleased version of GPT-4 (named “gpt-4-32k”), which supports super long text inputs, is even more expensive, twice as expensive as regular GPT-4.&lt;/p&gt;
&lt;p&gt;If ChatGPT works for your use case, I recommend using that since it’s so much less expensive.&lt;/p&gt;
&lt;p&gt;For summarizing short text or translations, ChatGPT works well.&lt;/p&gt;
&lt;p&gt;For analyzing or generating long text, you may need GPT-4&lt;/p&gt;
&lt;p&gt;GPT-4 is much better than the other models for nuanced answers or complex instructions.&lt;/p&gt;
&lt;p&gt;In future updates to the &lt;a href=&quot;https://github.com/briansunter/logseq-plugin-gpt3-openai&quot;&gt;Logseq OpenAI plugin&lt;/a&gt;, I want to allow users to choose the model based on the task, where you’ll be able to specify which model to use on a per action basis. That way, you can use affordable models for simple tasks and more expensive models for complex tasks.&lt;/p&gt;
&lt;p&gt;I hope you enjoyed this newsletter! Be sure to follow me on &lt;a href=&quot;https://twitter.com/Bsunter&quot;&gt;Twitter&lt;/a&gt; for more about my projects and thoughts on programming, AI, and Logseq.&lt;/p&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Newsletter 11 - Moving to Hawaii and Fitness Routine</title><link>https://briansunter.com/newsletter/issue-11</link><guid isPermaLink="true">https://briansunter.com/newsletter/issue-11</guid><description>Some thoughts on moving to Hawaii and what I&apos;m doing to improve my fitness</description><pubDate>Fri, 17 Feb 2023 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/honolulu_1676694313546_0.Cia5Exxi_Z2mPBkq.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;h2&gt;Moving to Hawaii&lt;/h2&gt;
&lt;p&gt;Hi everyone. This post is an update on my personal life.&lt;/p&gt;
&lt;p&gt;I recently moved to Honolulu, Hawaii, on the island of Oahu with my partner, and we’ve been here for about four months. I have lived in San Francisco for around nine years, and moving here has been a great change of pace.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Christmas at the beach&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 4000px) 4000px, 100vw&quot; width=&quot;4000&quot; height=&quot;2250&quot; src=&quot;https://briansunter.com/_astro/EB84C71D-598E-46F0-8A16-41D4CC705870_1_201_a_1676695287535_0.CjqllZkN_pR8YQ.webp&quot; srcset=&quot;https://briansunter.com/_astro/EB84C71D-598E-46F0-8A16-41D4CC705870_1_201_a_1676695287535_0.CjqllZkN_Z14SCmt.webp 640w, https://briansunter.com/_astro/EB84C71D-598E-46F0-8A16-41D4CC705870_1_201_a_1676695287535_0.CjqllZkN_Z11tfhQ.webp 750w, https://briansunter.com/_astro/EB84C71D-598E-46F0-8A16-41D4CC705870_1_201_a_1676695287535_0.CjqllZkN_ZoHCph.webp 828w, https://briansunter.com/_astro/EB84C71D-598E-46F0-8A16-41D4CC705870_1_201_a_1676695287535_0.CjqllZkN_1FpGBW.webp 1080w, https://briansunter.com/_astro/EB84C71D-598E-46F0-8A16-41D4CC705870_1_201_a_1676695287535_0.CjqllZkN_ZAlRpw.webp 1280w, https://briansunter.com/_astro/EB84C71D-598E-46F0-8A16-41D4CC705870_1_201_a_1676695287535_0.CjqllZkN_dgDMs.webp 1668w, https://briansunter.com/_astro/EB84C71D-598E-46F0-8A16-41D4CC705870_1_201_a_1676695287535_0.CjqllZkN_JTd9U.webp 2048w, https://briansunter.com/_astro/EB84C71D-598E-46F0-8A16-41D4CC705870_1_201_a_1676695287535_0.CjqllZkN_Zm4k6R.webp 2560w, https://briansunter.com/_astro/EB84C71D-598E-46F0-8A16-41D4CC705870_1_201_a_1676695287535_0.CjqllZkN_pR8YQ.webp 4000w&quot; /&gt;&lt;figcaption&gt;Christmas at the beach&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;After two years of working from home in a small one-bedroom apartment during the strict San Francisco lockdowns due to Covid, we both craved more time outdoors and a chance to have more fun. My main goals since moving to Hawaii have been to spend as much time as possible outside, learn new skills, and work on new projects. It took a little while to feel settled here, but we found a great apartment near the beach and are starting to feel established.&lt;/p&gt;
&lt;p&gt;One of my favorite things about living in Hawaii is the weather. It’s always perfect, which has been dramatically improving our well-being. Over the last two years, we spent so much time cooped up indoors that being outside has been rejuvenating. The temperature ranges from 63-85°F (17-29°C), which means we can wear shorts and T-shirts all year round.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Brian at the beach&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 480px) 480px, 100vw&quot; width=&quot;480&quot; height=&quot;640&quot; src=&quot;https://briansunter.com/_astro/IMG_7983_1676695639133_0.Cje98vYS_ZQj4RB.webp&quot; srcset=&quot;https://briansunter.com/_astro/IMG_7983_1676695639133_0.Cje98vYS_ZQj4RB.webp 480w&quot; /&gt;&lt;figcaption&gt;Brian at the beach&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;As someone who grew up in Florida, I love warm weather, but not the extreme heat, hurricanes, and storms. San Francisco had good weather overall, but it could be chilly, foggy, and rainy – especially during winter. It was hard to motivate myself to go outside sometimes. I’ve been taking long walks for hours here in Hawaii, enjoying the scenery, and reading outside. I love going on a long walks in the evening without needing a jacket.&lt;/p&gt;
&lt;p&gt;The outdoors in Hawaii are spectacular. We’re constantly reminded we’re not in an ordinary place by the unique scenery around us. The volcanic ridges in the distance are particularly striking, and we have a good view of them from our apartment. I love watching the clouds and mist pass over them, and I’ve never seen so many rainbows.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;A2DB81CB-32D2-431F-8B94-3F86694B329C 1 105 c&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 461px) 461px, 100vw&quot; width=&quot;461&quot; height=&quot;614&quot; src=&quot;https://briansunter.com/_astro/A2DB81CB-32D2-431F-8B94-3F86694B329C_1_105_c_1676932322748_0.DW-v4SXe_2lVVRN.webp&quot; srcset=&quot;https://briansunter.com/_astro/A2DB81CB-32D2-431F-8B94-3F86694B329C_1_105_c_1676932322748_0.DW-v4SXe_2lVVRN.webp 461w&quot; /&gt;&lt;figcaption&gt;A2DB81CB-32D2-431F-8B94-3F86694B329C 1 105 c&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;There are great beaches right next to our apartment, and the view of the Diamond Head crater is breathtaking. I swim in the ocean as frequently as possible for exercise, and I often see sea turtles while swimming and sometimes get startled when one of their huge heads pops up for air next to me.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Screenshot 2023-02-20 at 1.00.37 PM&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1206px) 1206px, 100vw&quot; width=&quot;1206&quot; height=&quot;676&quot; src=&quot;https://briansunter.com/_astro/Screenshot_2023-02-20_at_1.00.37_PM_1676934104689_0.Dl_Ikh_O_1Ws2iB.webp&quot; srcset=&quot;https://briansunter.com/_astro/Screenshot_2023-02-20_at_1.00.37_PM_1676934104689_0.Dl_Ikh_O_MyXCa.webp 640w, https://briansunter.com/_astro/Screenshot_2023-02-20_at_1.00.37_PM_1676934104689_0.Dl_Ikh_O_xX7yL.webp 750w, https://briansunter.com/_astro/Screenshot_2023-02-20_at_1.00.37_PM_1676934104689_0.Dl_Ikh_O_Z21iHpn.webp 828w, https://briansunter.com/_astro/Screenshot_2023-02-20_at_1.00.37_PM_1676934104689_0.Dl_Ikh_O_29R5Sn.webp 1080w, https://briansunter.com/_astro/Screenshot_2023-02-20_at_1.00.37_PM_1676934104689_0.Dl_Ikh_O_1Ws2iB.webp 1206w&quot; /&gt;&lt;figcaption&gt;Screenshot 2023-02-20 at 1.00.37 PM&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;I’ve started getting into stand-up paddleboarding, which is a ton of fun (though more challenging than it looks). The ocean temperature is really pleasant and much warmer than the frigid beaches in California.&lt;/p&gt;
&lt;p&gt;I’m looking forward to trying my hand at surfing soon. There are tons of surfers out at the beach, and watching them is entertaining, especially the people hydrofoil surfing, gliding on top of the water using a hydrofoil under the board.&lt;/p&gt;
&lt;iframe width=&quot;515&quot; height=&quot;915&quot; src=&quot;https://www.youtube.com/embed/uz7NN1osyHw&quot; title=&quot;Hydrofoil Surfing in Waikiki - Honolulu Hawaii&quot; frameborder=&quot;0&quot; allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share&quot; allowfullscreen&gt;&lt;/iframe&gt;
&lt;p&gt;We’ve been road-tripping around the island, discovering new beaches and unique scenery in every area. It’s an incredible place to live if you’re a fan of the outdoors, and there’s always something new to explore. Living in Hawaii has been a dream, and I’m incredibly grateful to be here.&lt;/p&gt;
&lt;iframe width=&quot;100%&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/4iJDXBfc6C8&quot; frameborder=&quot;0&quot; loading=&quot;lazy&quot; allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen&gt;&lt;/iframe&gt;
&lt;h2&gt;Improving my Health and Fitness&lt;/h2&gt;
&lt;p&gt;I wasn’t taking care of my health as much as I should have in the past few years, so my top priority is building a healthier lifestyle. I used to be pretty active when walking to work and going to the gym a few times a week, but when Covid hit, and I started working from home, it threw a wrench in my fitness routine, so now I’m trying to get back on track.&lt;/p&gt;
&lt;p&gt;My main focus has been strength training with resistance loop bands at home. I used to think free weights were the only way to build strength, but these have been challenging and let me gradually increase the resistance by adding more and heavier bands. It also takes much less time than going to the gym, and many exercises feel safer than free weights when exercising alone.&lt;/p&gt;
&lt;p&gt;I’ve been doing long swims in the ocean at the beaches near my apartment for cardio. Swimming in open water is quite a bit more intense than in the pool and has been a great workout. There’s interesting sea life and great views which keep me entertained. I also try to make it to the water at least once weekly to go paddle boarding.&lt;/p&gt;
&lt;p&gt;I’m continuing to do Yoga every other day for mobility and mindfulness. I highly recommend the &lt;a href=&quot;https://www.youtube.com/@yogawithadriene&quot;&gt;Yoga with Adrienne&lt;/a&gt; videos on YouTube, which I’ve followed for many years. I appreciate her kindness and positivity; these videos always put me in a better mood. They’ve improved my overall movement and flexibility, helping me recover and reduce soreness from the resistance training.&lt;/p&gt;
&lt;p&gt;I’ve been increasing my overall movement and time outside as much as possible. I start each day with an hour-long walk which has been great for my physical and mental health. I plan my day, think about my life, listen to great audiobooks and podcasts, and get good early sun exposure, which has been helping my sleep and energy levels.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Ala Wai Canal&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1024px) 1024px, 100vw&quot; width=&quot;1024&quot; height=&quot;769&quot; src=&quot;https://briansunter.com/_astro/B6BB3671-6A00-4196-B32D-1C6D8A45D9FB_1_105_c_1676957239107_0.B1-AUmF3_2s8bwj.webp&quot; srcset=&quot;https://briansunter.com/_astro/B6BB3671-6A00-4196-B32D-1C6D8A45D9FB_1_105_c_1676957239107_0.B1-AUmF3_ZVQg2V.webp 640w, https://briansunter.com/_astro/B6BB3671-6A00-4196-B32D-1C6D8A45D9FB_1_105_c_1676957239107_0.B1-AUmF3_Z1aSRNs.webp 750w, https://briansunter.com/_astro/B6BB3671-6A00-4196-B32D-1C6D8A45D9FB_1_105_c_1676957239107_0.B1-AUmF3_7NQfi.webp 828w, https://briansunter.com/_astro/B6BB3671-6A00-4196-B32D-1C6D8A45D9FB_1_105_c_1676957239107_0.B1-AUmF3_2s8bwj.webp 1024w&quot; /&gt;&lt;figcaption&gt;Ala Wai Canal&lt;/figcaption&gt;&lt;/figure&gt;
&lt;blockquote&gt;
&lt;p&gt;Morning walk down the Ala Wai canal - 1 hour round trip. Straight shot with no intersections and some good views.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;As someone who enjoys programming, research, and writing, I aim to be well-rounded by allocating enough time for each while taking care of my health and enjoying life.&lt;/p&gt;
&lt;p&gt;Though this is more personal than my previous newsletters, I hope you enjoyed hearing more about me and what I’ve been up to. Hopefully, I’ve given you more insight into how I spend my time away from coding, AI, and Twitter.&lt;/p&gt;
&lt;p&gt;I’ll continue focusing on my projects and learnings in future issues, but occasionally I’ll include personal facets as I have in this issue. Let me know if you’d like to see more of this kind of content on &lt;a href=&quot;https://twitter.com/bsunter&quot;&gt;Twitter&lt;/a&gt;&lt;/p&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Newsletter Issue 10</title><link>https://briansunter.com/newsletter/issue-10</link><guid isPermaLink="true">https://briansunter.com/newsletter/issue-10</guid><description>Logseq GPT-3 OpenAI popup, YouTube captions plugin updates, and migrating to Substack</description><pubDate>Wed, 01 Feb 2023 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/Screenshot_2023-02-02_at_1.42.14_PM_1675381393942_0.CtuKbw2I_2x03HF.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Intro&lt;/h2&gt;
&lt;p&gt;I migrated the newsletter to &lt;a href=&quot;https://newsletter.briansunter.com&quot;&gt;Substack&lt;/a&gt;, released a big update to the &lt;a href=&quot;https://github.com/briansunter/logseq-plugin-gpt3-openai&quot;&gt;Logseq GPT-3 OpenAI plugin&lt;/a&gt;, and added some features to the &lt;a href=&quot;https://github.com/briansunter/logseq-get-youtube-captions&quot;&gt;Logseq YouTube captions plugin&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Migrating to substack&lt;/h2&gt;
&lt;p&gt;This is the first newsletter sent out through &lt;a href=&quot;https://newsletter.briansunter.com&quot;&gt;Substack&lt;/a&gt;. The response to the newsletter has exceeded my expectations, and I’m thrilled that over 300 of you have subscribed so far. One of my goals this year is to be more consistent in publishing the newsletter, so I hope you enjoy keeping up with my projects and thoughts.&lt;/p&gt;
&lt;p&gt;Before, I used a tool called Revue to send the newsletter, which Twitter owned. Revue was recently shut down.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Screenshot 2023-02-01 at 11.23.19 AM&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 745px) 745px, 100vw&quot; width=&quot;745&quot; height=&quot;575&quot; src=&quot;https://briansunter.com/_astro/Screenshot_2023-02-01_at_11.23.19_AM_1675286836488_0.CMsTF0Ly_ZQfPBm.webp&quot; srcset=&quot;https://briansunter.com/_astro/Screenshot_2023-02-01_at_11.23.19_AM_1675286836488_0.CMsTF0Ly_Z1Peh4o.webp 640w, https://briansunter.com/_astro/Screenshot_2023-02-01_at_11.23.19_AM_1675286836488_0.CMsTF0Ly_ZQfPBm.webp 745w&quot; /&gt;&lt;figcaption&gt;Screenshot 2023-02-01 at 11.23.19 AM&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Revue was decent but had some issues. I used it because it was free, and it gave you a special “subscribe” button on your Twitter profile.&lt;/p&gt;
&lt;p&gt;I’m glad I set up a custom domain name: &lt;a href=&quot;https://newsletter.briansunter.com&quot;&gt;newsletter.briansunter.com&lt;/a&gt; instead of sharing links to the newsletter using Revue’s default domain name, &lt;code&gt;revue.co&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;If I had shared the links using the default &lt;code&gt;revue.co&lt;/code&gt; domain, all those links would have been broken now that Revue shut down. Since I used my &lt;code&gt;briansunter.com&lt;/code&gt; domain, the links I shared earlier still work and now direct to Substack.&lt;/p&gt;
&lt;p&gt;This was a good lesson on the benefits of owning your domain name and subscribers: you can switch platforms later if necessary. I don’t like my content being locked into a domain I don’t control, like &lt;a href=&quot;https://twitter.com/bsunter&quot;&gt;twitter.com/bsunter&lt;/a&gt;, &lt;code&gt;bsunter.substack.com&lt;/code&gt;, &lt;code&gt;bsunter.medium.com&lt;/code&gt;, etc. There’s always a chance services like these will degrade, become unfashionable, or be shut down, but I’ve been using &lt;a href=&quot;https://briansunter.com&quot;&gt;briansunter.com&lt;/a&gt; since 2010 for 13 years now.&lt;/p&gt;
&lt;p&gt;Another benefit of the personal newsletter format is the ability to migrate your followers. If you want to move away from social networks like Twitter or YouTube, then you lose the entire audience you built there. Since I can export the newsletter’s subscriber list, it was relatively straightforward to migrate you all to Substack.&lt;/p&gt;
&lt;p&gt;I hope the combination of sharing content under my domain and the newsletter format will avoid rug pulls from corporations and help build an audience long-term.&lt;/p&gt;
&lt;p&gt;You can read all the newsletter issues &lt;a href=&quot;https://briansunter.com/newsletter&quot;&gt;on my site&lt;/a&gt;, on &lt;a href=&quot;https://newsletter.briansunter.com&quot;&gt;my Substack&lt;/a&gt;, or receive updates via &lt;a href=&quot;https://briansunter.com/index.xml&quot;&gt;RSS&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Logseq GPT-3 OpenAI plugin updates&lt;/h2&gt;
&lt;p&gt;I updated the &lt;a href=&quot;https://github.com/briansunter/logseq-plugin-gpt3-openai&quot;&gt;Logseq GPT-3 OpenAI plugin&lt;/a&gt; to include a popup window to perform AI tasks powered by OpenAI’s GPT-3 in Logseq. I hope this new popup user interface makes the plugin easier and more convenient.&lt;/p&gt;
&lt;p&gt;I’m excited by the positive response this plugin has gotten. It blows my mind that it has over 16,000 downloads now 🤯&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Screenshot 2023-02-01 at 12.31.39 PM&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 336px) 336px, 100vw&quot; width=&quot;336&quot; height=&quot;146&quot; src=&quot;https://briansunter.com/_astro/Screenshot_2023-02-01_at_12.31.39_PM_1675290864727_0.DZKAW8xR_Z2aQgUl.webp&quot; srcset=&quot;https://briansunter.com/_astro/Screenshot_2023-02-01_at_12.31.39_PM_1675290864727_0.DZKAW8xR_Z2aQgUl.webp 336w&quot; /&gt;&lt;figcaption&gt;Screenshot 2023-02-01 at 12.31.39 PM&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;There are three new modes: &lt;strong&gt;custom commands&lt;/strong&gt;, &lt;strong&gt;built-in commands&lt;/strong&gt;, and &lt;strong&gt;user-defined commands&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;There’s also a way for the community to contribute useful commands to the plugin for everyone to use. There’s &lt;a href=&quot;https://github.com/briansunter/logseq-plugin-gpt3-openai/blob/master/src/prompts/prompts.toml&quot;&gt;a TOML text file in the repo&lt;/a&gt; where you can easily add new prompts to the plugin.&lt;/p&gt;
&lt;p&gt;Just hit &lt;code&gt;cmd+g&lt;/code&gt; while your cursor is in a text block to activate the plugin.&lt;/p&gt;
&lt;h3&gt;Custom commands&lt;/h3&gt;
&lt;p&gt;After you open the popup, you can ask the AI to perform a task by typing any command in the popup. If your cursor is in a text box, it will use that text as context for the command.&lt;/p&gt;
&lt;h4&gt;Flash cards&lt;/h4&gt;
&lt;p&gt;For example, if you have a block of text and want to generate question-and-answer flashcards to help you remember important points, you could type&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;create flash cards based on the following text:&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;video src=&quot;../../assets/videos/custom-prompt_1674094160276_0_1675213615966_0.mp4&quot; muted&gt;&lt;/video&gt;&lt;/p&gt;
&lt;h4&gt;Study topics&lt;/h4&gt;
&lt;p&gt;If your cursor is in an empty block, you can ask it to perform a task without input.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What topics should I study to understand deep learning?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;video src=&quot;../../assets/videos/2023-01-18_16.22.13_1674095036177_0_1675214083513_0.mp4&quot; muted&gt;&lt;/video&gt;&lt;/p&gt;
&lt;p&gt;This often gives me better, more direct results than searching on Google&lt;/p&gt;
&lt;h3&gt;Built-in commands&lt;/h3&gt;
&lt;p&gt;There are many built-in commands for common use cases such as:&lt;/p&gt;
&lt;p&gt;Summarizing text&lt;/p&gt;
&lt;p&gt;Fixing spelling and grammar&lt;/p&gt;
&lt;p&gt;Creating outlines&lt;/p&gt;
&lt;p&gt;Identifying most important ideas in a text&lt;/p&gt;
&lt;p&gt;Finding common objections to ideas in a text&lt;/p&gt;
&lt;p&gt;Here are some demos:&lt;/p&gt;
&lt;h4&gt;Summarize text&lt;/h4&gt;
&lt;figure&gt;&lt;img alt=&quot;summarize&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1028px) 1028px, 100vw&quot; width=&quot;1028&quot; height=&quot;778&quot; src=&quot;https://briansunter.com/_astro/summarize_1674095683669_0.hZwRaP7H_xAdsT.webp&quot; srcset=&quot;https://briansunter.com/_astro/summarize_1674095683669_0.hZwRaP7H_FJejN.webp 640w, https://briansunter.com/_astro/summarize_1674095683669_0.hZwRaP7H_avEdN.webp 750w, https://briansunter.com/_astro/summarize_1674095683669_0.hZwRaP7H_Z1X94j9.webp 828w, https://briansunter.com/_astro/summarize_1674095683669_0.hZwRaP7H_xAdsT.webp 1028w&quot; /&gt;&lt;figcaption&gt;summarize&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h4&gt;Common objections to an idea&lt;/h4&gt;
&lt;p&gt;&lt;video src=&quot;../../assets/videos/common-objections_1674095797741_0_1675214273662_0.mp4&quot; muted&gt;&lt;/video&gt;&lt;/p&gt;
&lt;h3&gt;User-defined commands&lt;/h3&gt;
&lt;p&gt;You can define your own commands to show up in the popup.&lt;/p&gt;
&lt;p&gt;These are defined similarly as &lt;a href=&quot;https://docs.logseq.com/#/page/templates&quot;&gt;Logseq templates.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Here’s an example of a command I use for creating Chinese language learning flashcards from YouTube video captions.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;FmccSaQakAM6JF&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 680px) 680px, 100vw&quot; width=&quot;680&quot; height=&quot;369&quot; src=&quot;https://briansunter.com/_astro/FmccSaQakAM6JF_1675294552245_0.BTvEucY6_ZlsnVs.webp&quot; srcset=&quot;https://briansunter.com/_astro/FmccSaQakAM6JF_1675294552245_0.BTvEucY6_2i8qAx.webp 640w, https://briansunter.com/_astro/FmccSaQakAM6JF_1675294552245_0.BTvEucY6_ZlsnVs.webp 680w&quot; /&gt;&lt;figcaption&gt;FmccSaQakAM6JF&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;You can then activate the popup and your custom commands will show up&lt;/p&gt;
&lt;p&gt;&lt;video src=&quot;../../assets/videos/2023-01-13_14.20.49_1675294883999_0.mp4&quot; muted&gt;&lt;/video&gt;&lt;/p&gt;
&lt;h3&gt;Preview, Insert, and Replace&lt;/h3&gt;
&lt;p&gt;After you hit enter to run a command, the popup will show you a preview of the result from GPT-3, so you can decide if you want to insert the result into your notes.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Screenshot 2023-02-02 at 1.42.14 PM&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 859px) 859px, 100vw&quot; width=&quot;859&quot; height=&quot;479&quot; src=&quot;https://briansunter.com/_astro/Screenshot_2023-02-02_at_1.42.14_PM_1675381393942_0.CtuKbw2I_1upbQx.webp&quot; srcset=&quot;https://briansunter.com/_astro/Screenshot_2023-02-02_at_1.42.14_PM_1675381393942_0.CtuKbw2I_Z1tYjLR.webp 640w, https://briansunter.com/_astro/Screenshot_2023-02-02_at_1.42.14_PM_1675381393942_0.CtuKbw2I_2uSmvi.webp 750w, https://briansunter.com/_astro/Screenshot_2023-02-02_at_1.42.14_PM_1675381393942_0.CtuKbw2I_1R6avH.webp 828w, https://briansunter.com/_astro/Screenshot_2023-02-02_at_1.42.14_PM_1675381393942_0.CtuKbw2I_1upbQx.webp 859w&quot; /&gt;&lt;figcaption&gt;Screenshot 2023-02-02 at 1.42.14 PM&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;From here, you can either insert the AI output underneath the current block, or replace the input text with the AI result.&lt;/p&gt;
&lt;p&gt;You can also hit “regenerate” to rerun the command and get a new output. The result of the AI commands differs each time, and sometimes the first try doesn’t give the best result.&lt;/p&gt;
&lt;p&gt;I wrote a issue-10|full blog post on the plugin here if you want to learn more&lt;/p&gt;
&lt;h2&gt;Logseq YouTube captions plugin updates&lt;/h2&gt;
&lt;p&gt;The &lt;a href=&quot;https://github.com/briansunter/logseq-get-youtube-captions&quot;&gt;Logseq YouTube captions plugin&lt;/a&gt; lets you download the captions from a YouTube video directly into your notes.&lt;/p&gt;
&lt;p&gt;I released a small update that breaks up the text into multiple blocks and inserts a timestamp into each block so you can jump to that point in the video.&lt;/p&gt;
&lt;p&gt;&lt;video src=&quot;../../assets/videos/2023-01-19_19.38.12-1080_1675382901079_0.mp4&quot; muted&gt;&lt;/video&gt;&lt;/p&gt;
&lt;p&gt;This plugin works really well when combined with the &lt;a href=&quot;https://github.com/briansunter/logseq-plugin-gpt3-openai&quot;&gt;Logseq GPT-3 OpenAI plugin&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For example, you can download the captions and use the GPT-3 plugin to summarize the video&lt;/p&gt;
&lt;p&gt;Another good use case is using the GPT-3 plugin to clean up the grammar and format the captions, making them easier to read.&lt;/p&gt;
&lt;p&gt;YouTube automatically generates captions from the voice in the video, which are often messy and don’t have punctuation. The GPT-3 plugin can make the captions from these videos much nicer.&lt;/p&gt;
&lt;p&gt;For interview style podcasts, you can use the GPT-3 plugin to add which speaker is talking in the captions.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;This is a dialog where lex interviews andrej. Rewrite the following dialog to add which speaker is talking:&lt;/p&gt;
&lt;/blockquote&gt;
&lt;figure&gt;&lt;img alt=&quot;dialog&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 826px) 826px, 100vw&quot; width=&quot;826&quot; height=&quot;758&quot; src=&quot;https://briansunter.com/_astro/dialog_1675384470274_0.PoR7YYH4_YRnVu.webp&quot; srcset=&quot;https://briansunter.com/_astro/dialog_1675384470274_0.PoR7YYH4_h4pWf.webp 640w, https://briansunter.com/_astro/dialog_1675384470274_0.PoR7YYH4_ZWu7GS.webp 750w, https://briansunter.com/_astro/dialog_1675384470274_0.PoR7YYH4_YRnVu.webp 826w&quot; /&gt;&lt;figcaption&gt;dialog&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;I’ve also been using YouTube for language learning and studying Chinese. Understanding native content in a foreign language is extremely challenging, so before I watch the video, I often download the video captions and run some GPT-3 commands. I can get a summary of the video in English, identify important phrases, extract uncommon words, and create flashcards based on the video. Then, when I watch the video, I understand much more.&lt;/p&gt;
&lt;p&gt;There is so much good educational content on YouTube, and taking notes on videos is one of my favorite use cases for Logseq.&lt;/p&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Logseq GPT-3 OpenAI Popup</title><link>https://briansunter.com/logseq-openai/popup</link><guid isPermaLink="true">https://briansunter.com/logseq-openai/popup</guid><description>A new popup interface for running custom GPT-3 commands in Logseq.</description><pubDate>Tue, 31 Jan 2023 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/summarize_1674095683669_0.hZwRaP7H_ZXH9z6.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;p&gt;I updated the &lt;a href=&quot;https://github.com/briansunter/logseq-plugin-gpt3-openai&quot;&gt;Logseq OpenAI plugin&lt;/a&gt; to include a popup window to perform AI tasks powered by OpenAI’s GPT-3 in Logseq.&lt;/p&gt;
&lt;p&gt;There are three modes: &lt;strong&gt;custom commands&lt;/strong&gt;, &lt;strong&gt;built-in commands&lt;/strong&gt;, and &lt;strong&gt;user-defined commands&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;There’s also a way for the community to contribute useful commands to the plugin for everyone to use.&lt;/p&gt;
&lt;h2&gt;Background&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://openai.com/api/&quot;&gt;OpenAI’s GPT-3&lt;/a&gt; is an AI tool that allows you to analyze and generate text. It can perform many tasks, such as answering questions about a topic, writing blog posts, summarizing text, and more.&lt;/p&gt;
&lt;p&gt;I’ve found various interesting use cases in my notetaking workflow, and it’s been a useful “swiss army knife” for notetaking and text manipulation.&lt;/p&gt;
&lt;p&gt;The original version of this plugin was pretty basic. In the previous version, you would write a GPT-3 “prompt” inside a text block along with the input text, generating a response and inserting it underneath your text. I hope this new popup is easier to use and more convenient.&lt;/p&gt;
&lt;p&gt;There have been a few “AI writer” integrations in existing tools like Notion and many startups built around OpenAI GPT-3.&lt;/p&gt;
&lt;p&gt;These tools are nice and have good user interfaces but have some limitations for personal notetaking use cases and for power users. I wanted something that was pay-as-you-go instead of subscription-based, allowed a lot of customizability, and allowed users to share prompts with each other.&lt;/p&gt;
&lt;p&gt;The plugin is free and open source but uses OpenAI’s API, which does charge per API request; however, using their API directly with your key is much cheaper than any commercial option.&lt;/p&gt;
&lt;h2&gt;Getting started&lt;/h2&gt;
&lt;p&gt;Go to the logseq plugin marketplace and search for “openai” or update the plugin to get the latest version.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Screenshot 2023-01-31 at 1.47.24 PM&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1052px) 1052px, 100vw&quot; width=&quot;1052&quot; height=&quot;394&quot; src=&quot;https://briansunter.com/_astro/Screenshot_2023-01-31_at_1.47.24_PM_1675208862852_0.CCfC8H4v_Z1EOFuy.webp&quot; srcset=&quot;https://briansunter.com/_astro/Screenshot_2023-01-31_at_1.47.24_PM_1675208862852_0.CCfC8H4v_2tdRnQ.webp 640w, https://briansunter.com/_astro/Screenshot_2023-01-31_at_1.47.24_PM_1675208862852_0.CCfC8H4v_ZFIbbo.webp 750w, https://briansunter.com/_astro/Screenshot_2023-01-31_at_1.47.24_PM_1675208862852_0.CCfC8H4v_f5DOz.webp 828w, https://briansunter.com/_astro/Screenshot_2023-01-31_at_1.47.24_PM_1675208862852_0.CCfC8H4v_Z1EOFuy.webp 1052w&quot; /&gt;&lt;figcaption&gt;Screenshot 2023-01-31 at 1.47.24 PM&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Sign up for an &lt;a href=&quot;https://platform.openai.com/account/api-keys&quot;&gt;OpenAI API key&lt;/a&gt; if you don’t already have one, and add it in the plugin settings.&lt;/p&gt;
&lt;p&gt;Press &lt;code&gt;CMD+g&lt;/code&gt; to open the GPT-3 popup.&lt;/p&gt;
&lt;p&gt;If you have your cursor inside a block, the popup will use the text in the block as input to the command.&lt;/p&gt;
&lt;p&gt;If the block is empty, it will run the command without input.&lt;/p&gt;
&lt;p&gt;For now, the input text from the block is appended after the command prompt you type in the popup.&lt;/p&gt;
&lt;p&gt;If you are on a page and don’t have a block selected, the plugin will append the result in a block at the bottom of the page and won’t use any text as input.&lt;/p&gt;
&lt;h2&gt;Custom commands&lt;/h2&gt;
&lt;p&gt;You can open the popup and type in any task you want to perform.&lt;/p&gt;
&lt;p&gt;For example, if you have a block of text and want to generate question-and-answer flashcards to help you remember important points, you could type&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;create flash cards based on the following text:&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;video src=&quot;../../assets/videos/custom-prompt_1674094160276_0_1675213615966_0.mp4&quot; muted&gt;&lt;/video&gt;&lt;/p&gt;
&lt;p&gt;If you’re in an empty block, you can ask it to perform a task without input.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What topics should I study to understand deep learning?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;video src=&quot;../../assets/videos/2023-01-18_16.22.13_1674095036177_0_1675214083513_0.mp4&quot; muted&gt;&lt;/video&gt;&lt;/p&gt;
&lt;h3&gt;Built-in commands&lt;/h3&gt;
&lt;p&gt;There are many built-in commands for common use cases&lt;/p&gt;
&lt;p&gt;&lt;video src=&quot;../../assets/videos/built-in-prompt-templates_1674096790451_0_1675214113992_0.mp4&quot; muted&gt;&lt;/video&gt;&lt;/p&gt;
&lt;p&gt;Some of the built-in prompts include:&lt;/p&gt;
&lt;p&gt;Summarize Text&lt;/p&gt;
&lt;p&gt;Fix Grammar&lt;/p&gt;
&lt;p&gt;Create Outline&lt;/p&gt;
&lt;p&gt;Extract Keywords&lt;/p&gt;
&lt;p&gt;Write introduction&lt;/p&gt;
&lt;p&gt;Find Keywords&lt;/p&gt;
&lt;p&gt;Ask Questions&lt;/p&gt;
&lt;p&gt;Find common objections to an idea&lt;/p&gt;
&lt;p&gt;Most important ideas&lt;/p&gt;
&lt;p&gt;Define word&lt;/p&gt;
&lt;p&gt;Find synonyms&lt;/p&gt;
&lt;p&gt;Find antonyms&lt;/p&gt;
&lt;p&gt;Create markdown table from text&lt;/p&gt;
&lt;p&gt;Translate to other languages&lt;/p&gt;
&lt;p&gt;Here are some demos of the built-in commands:&lt;/p&gt;
&lt;h4&gt;Summarize text&lt;/h4&gt;
&lt;figure&gt;&lt;img alt=&quot;summarize&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1028px) 1028px, 100vw&quot; width=&quot;1028&quot; height=&quot;778&quot; src=&quot;https://briansunter.com/_astro/summarize_1674095683669_0.hZwRaP7H_xAdsT.webp&quot; srcset=&quot;https://briansunter.com/_astro/summarize_1674095683669_0.hZwRaP7H_FJejN.webp 640w, https://briansunter.com/_astro/summarize_1674095683669_0.hZwRaP7H_avEdN.webp 750w, https://briansunter.com/_astro/summarize_1674095683669_0.hZwRaP7H_Z1X94j9.webp 828w, https://briansunter.com/_astro/summarize_1674095683669_0.hZwRaP7H_xAdsT.webp 1028w&quot; /&gt;&lt;figcaption&gt;summarize&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h4&gt;Create outline of text&lt;/h4&gt;
&lt;p&gt;&lt;video src=&quot;../../assets/videos/outline2_1674095716959_0_1675214186883_0.mp4&quot; muted&gt;&lt;/video&gt;&lt;/p&gt;
&lt;h4&gt;Most important ideas in a text&lt;/h4&gt;
&lt;p&gt;&lt;video src=&quot;../../assets/videos/important-ideas_1674095953444_0_1675214231308_0.mp4&quot; muted&gt;&lt;/video&gt;&lt;/p&gt;
&lt;h4&gt;Common objections to an idea&lt;/h4&gt;
&lt;p&gt;&lt;video src=&quot;../../assets/videos/common-objections_1674095797741_0_1675214273662_0.mp4&quot; muted&gt;&lt;/video&gt;&lt;/p&gt;
&lt;h3&gt;User-Defined commands&lt;/h3&gt;
&lt;p&gt;You can define your own commands to show up in the popup.&lt;/p&gt;
&lt;p&gt;These are defined similarly as &lt;a href=&quot;https://docs.logseq.com/#/page/templates&quot;&gt;Logseq templates.&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;How to create a user-defined command&lt;/h4&gt;
&lt;p&gt;Indent a block underneath the prompt template block that contains a code block of type &lt;code&gt;prompt&lt;/code&gt; (triple backticks followed by the word &lt;code&gt;prompt&lt;/code&gt;)&lt;/p&gt;
&lt;p&gt;These can be written anywhere in your notes and they’ll be detected in the popup (like logseq templates)&lt;/p&gt;
&lt;h4&gt;Language flash cards&lt;/h4&gt;
&lt;p&gt;Here’s an example of making language learning flashcards from a YouTube transcript.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;FmccSaQakAM6JF&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 680px) 680px, 100vw&quot; width=&quot;680&quot; height=&quot;369&quot; src=&quot;https://briansunter.com/_astro/FmccSaQakAM6JF_1675294552245_0.BTvEucY6_ZlsnVs.webp&quot; srcset=&quot;https://briansunter.com/_astro/FmccSaQakAM6JF_1675294552245_0.BTvEucY6_2i8qAx.webp 640w, https://briansunter.com/_astro/FmccSaQakAM6JF_1675294552245_0.BTvEucY6_ZlsnVs.webp 680w&quot; /&gt;&lt;figcaption&gt;FmccSaQakAM6JF&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;video src=&quot;../../assets/videos/2023-01-13_14.20.49_1675294883999_0.mp4&quot; muted&gt;&lt;/video&gt;&lt;/p&gt;
&lt;h4&gt;Student teacher dialog example&lt;/h4&gt;
&lt;p&gt;This is an example of defining a custom prompt to rewrite a piece of text as a dialog between a student and teacher.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Screenshot 2023-01-31 at 1.55.21 PM&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 697px) 697px, 100vw&quot; width=&quot;697&quot; height=&quot;187&quot; src=&quot;https://briansunter.com/_astro/Screenshot_2023-01-31_at_1.55.21_PM_1675209353980_0.B8twgrbX_ZzRThX.webp&quot; srcset=&quot;https://briansunter.com/_astro/Screenshot_2023-01-31_at_1.55.21_PM_1675209353980_0.B8twgrbX_Z2bwS9N.webp 640w, https://briansunter.com/_astro/Screenshot_2023-01-31_at_1.55.21_PM_1675209353980_0.B8twgrbX_ZzRThX.webp 697w&quot; /&gt;&lt;figcaption&gt;Screenshot 2023-01-31 at 1.55.21 PM&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;##+BEGIN_SRC&lt;/p&gt;
&lt;h1&gt;Student Teacher Dialog&lt;/h1&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;text&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;   Rewrite the following text as a dialog between a teacher and a student:&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;##+END_SRC&lt;/p&gt;
&lt;p&gt;&lt;video src=&quot;../../assets/videos/user-prompt_1675204065803_0.mp4&quot; muted&gt;&lt;/video&gt;&lt;/p&gt;
&lt;h3&gt;Preview&lt;/h3&gt;
&lt;p&gt;After you hit enter to run a command, the popup will show you a preview of the result from GPT-3, so you can decide if you want to insert the result into your notes&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Screenshot 2023-01-20 at 10.54.06 AM&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 570px) 570px, 100vw&quot; width=&quot;570&quot; height=&quot;337&quot; src=&quot;https://briansunter.com/_astro/Screenshot_2023-01-20_at_10.54.06_AM_1675203364365_0.KDzQ_5Gp_ZCGsTb.webp&quot; srcset=&quot;https://briansunter.com/_astro/Screenshot_2023-01-20_at_10.54.06_AM_1675203364365_0.KDzQ_5Gp_ZCGsTb.webp 570w&quot; /&gt;&lt;figcaption&gt;Screenshot 2023-01-20 at 10.54.06 AM&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h3&gt;Insert and Replace&lt;/h3&gt;
&lt;p&gt;After you run the command, you can either insert the GPT-3 result underneath the current block or replace the current block with the GPT-3 result.&lt;/p&gt;
&lt;p&gt;The replace feature is helpful when using the plugin to improve the tone of existing writing, fix grammar/spelling, and translate text into different languages.&lt;/p&gt;
&lt;h4&gt;Replace example&lt;/h4&gt;
&lt;p&gt;&lt;video src=&quot;../../assets/videos/video_1675205191234_0.mp4&quot; muted&gt;&lt;/video&gt;&lt;/p&gt;
&lt;h3&gt;Regenerate&lt;/h3&gt;
&lt;p&gt;Sometimes the first try doesn’t generate optimal results, so you can click “Regenerate” to re-run the prompt until you get something good.&lt;/p&gt;
&lt;p&gt;&lt;video src=&quot;../../assets/videos/video_1675205447669_0.mp4&quot; muted&gt;&lt;/video&gt;&lt;/p&gt;
&lt;h3&gt;Share Prompts&lt;/h3&gt;
&lt;p&gt;Do you have a prompt that the community would find useful? Contribute it to the &lt;a href=&quot;https://github.com/briansunter/logseq-plugin-gpt3-openai/blob/master/src/prompts/prompts.toml&quot;&gt;built-in prompts list&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;There’s a TOML text file in the repo where you can easily add new prompts.&lt;/p&gt;
&lt;p&gt;Go &lt;a href=&quot;https://github.com/briansunter/logseq-plugin-gpt3-openai/blob/master/src/prompts/prompts.toml&quot;&gt;here&lt;/a&gt; to see the prompt file in the repo&lt;/p&gt;
&lt;h3&gt;Future work&lt;/h3&gt;
&lt;p&gt;I have several enhancements in mind to add to the plugin.&lt;/p&gt;
&lt;p&gt;The next features I’m planning are to add better support for sending multiple blocks as the command input.&lt;/p&gt;
&lt;p&gt;I also want to add features that let you transform the input and output. For example, I could add the ability to remove markdown from the input text and split the output text into multiple blocks.&lt;/p&gt;
&lt;p&gt;Eventually, I’d like to support sourcing blocks throughout your notes using embeddings, so you can leverage the knowledge in your notes in the commands.&lt;/p&gt;
&lt;p&gt;I have a &lt;a href=&quot;https://github.com/users/briansunter/projects/1/views/1&quot;&gt;Github Project&lt;/a&gt; and &lt;a href=&quot;https://github.com/briansunter/logseq-plugin-gpt3-openai/issues&quot;&gt;list of issues&lt;/a&gt; to track ideas for features. Feel free to open an issue or contribute if you have an idea or find a bug!&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Screenshot 2023-01-31 at 1.17.09 PM&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1070px) 1070px, 100vw&quot; width=&quot;1070&quot; height=&quot;887&quot; src=&quot;https://briansunter.com/_astro/Screenshot_2023-01-31_at_1.17.09_PM_1675207870462_0.D_yNlELF_Z1HEhXt.webp&quot; srcset=&quot;https://briansunter.com/_astro/Screenshot_2023-01-31_at_1.17.09_PM_1675207870462_0.D_yNlELF_2hYrzE.webp 640w, https://briansunter.com/_astro/Screenshot_2023-01-31_at_1.17.09_PM_1675207870462_0.D_yNlELF_Z1cuk5g.webp 750w, https://briansunter.com/_astro/Screenshot_2023-01-31_at_1.17.09_PM_1675207870462_0.D_yNlELF_2rqg9G.webp 828w, https://briansunter.com/_astro/Screenshot_2023-01-31_at_1.17.09_PM_1675207870462_0.D_yNlELF_Z1HEhXt.webp 1070w&quot; /&gt;&lt;figcaption&gt;Screenshot 2023-01-31 at 1.17.09 PM&lt;/figcaption&gt;&lt;/figure&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator><category>blog</category></item><item><title>Binary Search Algorithm</title><link>https://briansunter.com/binary-search</link><guid isPermaLink="true">https://briansunter.com/binary-search</guid><description>A walkthrough of binary search with both iterative and recursive implementations, plus why it&apos;s O(log n).</description><pubDate>Thu, 05 Jan 2023 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/binary-search-cover.CsX-SeJ7_Z23nz3F.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Binary Search Iterative&lt;/h2&gt;
&lt;p&gt;You can do binary search recursively or iteratively.&lt;/p&gt;
&lt;p&gt;Binary search uses the divide and conquer strategy.&lt;/p&gt;
&lt;p&gt;Divide and conquer is breaking a problem into subproblems, then combining them to get a solution to the main problem.&lt;/p&gt;
&lt;p&gt;The list must be in sorted order to perform binary search.&lt;/p&gt;
&lt;p&gt;We need two index pointers, &lt;code&gt;low&lt;/code&gt; and &lt;code&gt;high&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Suppose we want to search for key element 42 in this list:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;[3, 6, 8, 12, 14, 17, 25, 29, 31, 36, 42, 47, 53, 55, 62]&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;middle&lt;/code&gt; is the floor of &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.2772em;vertical-align:-0.345em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mopen nulldelimiter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.9322em&quot;&gt;&lt;span style=&quot;top:-2.655em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.23em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line&quot; style=&quot;border-bottom-width:0.04em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.4461em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord text mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;low&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mbin mtight&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mord text mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;high&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.345em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;low&lt;/code&gt; is index 0 and &lt;code&gt;high&lt;/code&gt; is index 14, so &lt;code&gt;mid&lt;/code&gt; is 7.&lt;/p&gt;
&lt;p&gt;The number at index 7 is 29.&lt;/p&gt;
&lt;p&gt;The number 42 which we’re searching for is greater than 29, so the new &lt;code&gt;low&lt;/code&gt; becomes &lt;code&gt;mid + 1&lt;/code&gt;, which is 8.&lt;/p&gt;
&lt;p&gt;Now &lt;code&gt;low&lt;/code&gt; = 8 and &lt;code&gt;high&lt;/code&gt; = &lt;code&gt;14&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.1901em;vertical-align:-0.345em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mopen nulldelimiter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8451em&quot;&gt;&lt;span style=&quot;top:-2.655em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.23em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line&quot; style=&quot;border-bottom-width:0.04em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.394em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;mbin mtight&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;14&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.345em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;11&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; so the new &lt;code&gt;mid&lt;/code&gt; is 11.&lt;/p&gt;
&lt;p&gt;The number at index 11 is 47.&lt;/p&gt;
&lt;p&gt;The number 42 which we’re searching for is less than 47, so the new &lt;code&gt;high&lt;/code&gt; becomes &lt;code&gt;mid - 1&lt;/code&gt;, which is 10.&lt;/p&gt;
&lt;p&gt;Now &lt;code&gt;low&lt;/code&gt; = 8 and &lt;code&gt;high&lt;/code&gt;=10.&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.1901em;vertical-align:-0.345em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mopen nulldelimiter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8451em&quot;&gt;&lt;span style=&quot;top:-2.655em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.23em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line&quot; style=&quot;border-bottom-width:0.04em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.394em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;mbin mtight&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;10&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.345em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;9&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; so the new &lt;code&gt;mid&lt;/code&gt; is 9.&lt;/p&gt;
&lt;p&gt;The number at index 9 is 36.&lt;/p&gt;
&lt;p&gt;The number 42 which we’re searching for is greater than 36, so the new &lt;code&gt;low&lt;/code&gt; becomes &lt;code&gt;mid + 1&lt;/code&gt;, which is 10.&lt;/p&gt;
&lt;p&gt;Now both &lt;code&gt;low&lt;/code&gt; = 10 and &lt;code&gt;high&lt;/code&gt;= 10.&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.1901em;vertical-align:-0.345em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mopen nulldelimiter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8451em&quot;&gt;&lt;span style=&quot;top:-2.655em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.23em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line&quot; style=&quot;border-bottom-width:0.04em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.394em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;mbin mtight&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;10&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.345em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;10&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; so the new &lt;code&gt;mid&lt;/code&gt; is 10.&lt;/p&gt;
&lt;p&gt;The number at index 10 is 42, which is the number we’re searching for.&lt;/p&gt;
&lt;p&gt;How many comparisons have we done? 4.&lt;/p&gt;
&lt;p&gt;If we had been doing linear search it would have taken 11 comparisons.&lt;/p&gt;
&lt;h3&gt;Implementation&lt;/h3&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;js&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;//returns index of value or -1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; binarySearch&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;array&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;key&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;  let&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; low &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 0&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;  let&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; high &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; array.&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;length&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; -&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 1&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;  while&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (low &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;&amp;lt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; high) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;    const&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; mid&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; low &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; Math.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;floor&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;((high &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; low) &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 2&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;    if&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (array[mid] &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;===&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; key) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;      return&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; mid;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    } &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;else&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; if&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (key &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; array[mid]) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;      high &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; mid &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 1&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    } &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;else&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;      low &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; mid &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 1&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;  return&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; -&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3&gt;Visualize as Binary Search Tree&lt;/h3&gt;
&lt;p&gt;This can be arranged as a binary search tree.&lt;/p&gt;
&lt;p&gt;What is the worst case number of comparisons when searching for an element?&lt;/p&gt;
&lt;p&gt;If you don’t find it, you’ll search until you reach the bottom of the tree.&lt;/p&gt;
&lt;p&gt;The height of the tree is &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0197em&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0359em&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.3011em&quot;&gt;&lt;span style=&quot;top:-2.55em;margin-left:-0.0359em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.15em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; where n is the number of elements.&lt;/p&gt;
&lt;p&gt;So if there are 16 elements then &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0197em&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0359em&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.3011em&quot;&gt;&lt;span style=&quot;top:-2.55em;margin-left:-0.0359em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.15em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;16&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;4&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, so the height of the tree is 4 levels and the worst case number of comparisons will be 4.&lt;/p&gt;
&lt;p&gt;So worst case is &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0197em&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0359em&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;))&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; and best case is &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, when the element you’re looking for is the root.&lt;/p&gt;
&lt;h2&gt;Binary Search Recursive&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;[3, 6, 8, 12, 14, 17, 25, 29, 31, 36, 42, 47, 53, 55, 62]&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;When using divide and conquer, we divide into smaller problems then recombine.&lt;/p&gt;
&lt;p&gt;So we should define what defines a “small” problem when using divide and conquer.&lt;/p&gt;
&lt;p&gt;In this case a “small” problem is when there is only a single element, or when &lt;code&gt;low&lt;/code&gt; and &lt;code&gt;high&lt;/code&gt; are equal.&lt;/p&gt;
&lt;p&gt;Then when we have a single element, if the element is the target value, otherwise return -1.&lt;/p&gt;
&lt;p&gt;If the problem is large we make it smaller based on some logic.&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;js&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; recursiveBinarySearch&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;array&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;key&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;low&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;high&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;  if&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (low &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;===&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; high) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;    if&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (array[low] &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;===&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; key) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;      return&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; low;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    } &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;else&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;      return&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; -&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  } &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;else&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;    const&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; mid&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; low &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; Math.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;floor&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;((high &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; low) &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 2&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;    if&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (array[mid] &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;===&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; key) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;      return&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; mid;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    } &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;else&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; if&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (key &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; array[mid]) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;      return&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; recursiveBinarySearch&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(array, key, low, mid &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 1&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    } &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;else&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;      return&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; recursiveBinarySearch&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(array, key, mid &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 1&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, high);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3&gt;Recurrence Relation&lt;/h3&gt;
&lt;p&gt;Calculating mid, checking if &lt;code&gt;mid&lt;/code&gt; = &lt;code&gt;key&lt;/code&gt;, and checking if &lt;code&gt;array[mid]&lt;/code&gt; is greater or less than target each take one unit of time.&lt;/p&gt;
&lt;p&gt;When calling the recursive function it calls itself with &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;When list size is one, it just makes one comparison, so each is one unit of time.&lt;/p&gt;
&lt;span class=&quot;katex-display&quot;&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:3em;vertical-align:-1.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;minner&quot;&gt;&lt;span class=&quot;mopen delimcenter&quot; style=&quot;top:0em&quot;&gt;&lt;span class=&quot;delimsizing size4&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mtable&quot;&gt;&lt;span class=&quot;col-align-l&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.69em&quot;&gt;&lt;span style=&quot;top:-3.69em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3.008em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-2.25em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3.008em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mopen nulldelimiter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.6954em&quot;&gt;&lt;span style=&quot;top:-2.655em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.23em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line&quot; style=&quot;border-bottom-width:0.04em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.394em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.345em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.19em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;arraycolsep&quot; style=&quot;width:1em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;col-align-l&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.69em&quot;&gt;&lt;span style=&quot;top:-3.69em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3.008em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord text&quot;&gt;&lt;span class=&quot;mord&quot;&gt;when &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-2.25em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3.008em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord text&quot;&gt;&lt;span class=&quot;mord&quot;&gt;when &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.19em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;p&gt;By applying master’s theorem, we know the time complexity is &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0197em&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0359em&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;))&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;We use case 2 from the master’s theorem.&lt;/p&gt;
&lt;p&gt;We can think of the recurrence relation as:&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;⋅&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.2em;vertical-align:-0.35em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;minner&quot;&gt;&lt;span class=&quot;mopen delimcenter&quot; style=&quot;top:0em&quot;&gt;&lt;span class=&quot;delimsizing size1&quot;&gt;(&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mopen nulldelimiter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.6954em&quot;&gt;&lt;span style=&quot;top:-2.655em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.23em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line&quot; style=&quot;border-bottom-width:0.04em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.394em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.345em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose delimcenter&quot; style=&quot;top:0em&quot;&gt;&lt;span class=&quot;delimsizing size1&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Remember the master’s theorem:&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4445em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;⋅&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.2em;vertical-align:-0.35em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;minner&quot;&gt;&lt;span class=&quot;mopen delimcenter&quot; style=&quot;top:0em&quot;&gt;&lt;span class=&quot;delimsizing size1&quot;&gt;(&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mopen nulldelimiter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.6954em&quot;&gt;&lt;span style=&quot;top:-2.655em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;b&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.23em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line&quot; style=&quot;border-bottom-width:0.04em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.394em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.345em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose delimcenter&quot; style=&quot;top:0em&quot;&gt;&lt;span class=&quot;delimsizing size1&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1076em&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;In this equation &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; and &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;b&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0197em&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0359em&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.3011em&quot;&gt;&lt;span style=&quot;top:-2.55em;margin-left:-0.0359em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.15em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1076em&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; from the master’s theorem is &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; in this equation, because &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.8141em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, so we know &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; is 0 and &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.625em;vertical-align:-0.1944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;p&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; is 0.&lt;/p&gt;
&lt;p&gt;if &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0197em&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0359em&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.3361em&quot;&gt;&lt;span style=&quot;top:-2.55em;margin-left:-0.0359em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;b&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.15em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; is true, &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0197em&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0359em&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.3011em&quot;&gt;&lt;span style=&quot;top:-2.55em;margin-left:-0.0359em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.15em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, so we know it’s case 2.&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7335em;vertical-align:-0.1944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7278em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; so we know it’s case 2.1 of master’s theorem.&lt;/p&gt;
&lt;p&gt;Case 2.1 is &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0991em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8491em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;⋅&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0641em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;mbin mtight&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0641em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;⋅&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0641em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;mbin mtight&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;⋅&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0641em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0197em&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0359em&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;))&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Heap, Heap Sort, Heapify, and Priority Queues</title><link>https://briansunter.com/heap</link><guid isPermaLink="true">https://briansunter.com/heap</guid><description>How heaps work, why they&apos;re useful for priority queues, and how to implement heap sort.</description><pubDate>Thu, 05 Jan 2023 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/heap_1673042424667_0.CE2uIKFy_Z1yfb7H.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;figure&gt;&lt;img alt=&quot;heap&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1020px) 1020px, 100vw&quot; width=&quot;1020&quot; height=&quot;510&quot; src=&quot;https://briansunter.com/_astro/heap_1673042424667_0.CE2uIKFy_Zx4NtO.webp&quot; srcset=&quot;https://briansunter.com/_astro/heap_1673042424667_0.CE2uIKFy_Z11u33h.webp 640w, https://briansunter.com/_astro/heap_1673042424667_0.CE2uIKFy_Z8E54C.webp 750w, https://briansunter.com/_astro/heap_1673042424667_0.CE2uIKFy_p15D9.webp 828w, https://briansunter.com/_astro/heap_1673042424667_0.CE2uIKFy_Zx4NtO.webp 1020w&quot; /&gt;&lt;figcaption&gt;heap&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2&gt;Heap - Heap Sort - Heapify - Priority Queues&lt;/h2&gt;
&lt;h3&gt;Array Representation of Binary Tree&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;[a, b, c, d, e, f, g]&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;a&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;b&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;c&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;d&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;e&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;f&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;g&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;You can store a binary tree as an array.&lt;/p&gt;
&lt;p&gt;When storing a binary tree we need to store the elements as well as the relationship between the elements.&lt;/p&gt;
&lt;h3&gt;Binary Tree Representation Formula&lt;/h3&gt;
&lt;div class=&quot;markdown-alert markdown-alert-note&quot;&gt;&lt;p&gt;Note&lt;/p&gt;&lt;p&gt;These examples use an array with a 0-based index.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;If a node is at index &lt;code&gt;i&lt;/code&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The left child is at index &lt;code&gt;2*i+1&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;The right child is at index &lt;code&gt;2*i+2&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;The parent is at &lt;code&gt;Math.floor((i-1)/2)&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Examples&lt;/h3&gt;
&lt;p&gt;What is the left child of &lt;code&gt;b&lt;/code&gt; which is at index 1?&lt;/p&gt;
&lt;p&gt;The left child index is &lt;code&gt;2*1+1&lt;/code&gt; = 3, and the element at index 3 is &lt;code&gt;d&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;What is the right child of &lt;code&gt;b&lt;/code&gt; which is at index 1?&lt;/p&gt;
&lt;p&gt;The right child index is &lt;code&gt;2*1+2&lt;/code&gt; = 4, and the element at index 4 is &lt;code&gt;e&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;What is the parent of &lt;code&gt;f&lt;/code&gt; which is at index 5?&lt;/p&gt;
&lt;p&gt;The parent index is &lt;code&gt;Math.floor((5-1)/2)&lt;/code&gt; = 2, and the element at index 2 is &lt;code&gt;c&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;You can also think about filling them level by level.&lt;/p&gt;
&lt;h4&gt;Missing Nodes at the End&lt;/h4&gt;
&lt;p&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;a&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;b&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;c&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;d&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;e&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;[a, b, c, d, e]&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Leave out the missing elements at the end.&lt;/p&gt;
&lt;h4&gt;Gaps&lt;/h4&gt;
&lt;p&gt;Imagine filling it level by level, but leave a gap:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;a&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;b&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;c&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;f&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;g&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;[a, b, c, null, null, d, e]&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Children of b are missing, so leave a gap.&lt;/p&gt;
&lt;h3&gt;Complete Binary Tree&lt;/h3&gt;
&lt;h4&gt;Full Binary Tree&lt;/h4&gt;
&lt;p&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;a&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;b&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;c&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;d&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;e&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;f&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;g&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;A full binary tree has the maximum number of nodes for its height. You can’t add another node without increasing its height.&lt;/p&gt;
&lt;p&gt;The number of nodes in a full binary tree with height &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;h&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; is &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.9324em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8491em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;h&lt;/span&gt;&lt;span class=&quot;mbin mtight&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;h4&gt;Complete Binary Tree&lt;/h4&gt;
&lt;p&gt;When represented as an array, a complete binary tree doesn’t have any gaps.&lt;/p&gt;
&lt;h5&gt;Complete Binary Tree Example&lt;/h5&gt;
&lt;p&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;a&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;b&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;c&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;d&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;e&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;f&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;g&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Its array representation is &lt;code&gt;[a, b, c, d, e, f, g]&lt;/code&gt; and it has no gaps, so it’s a complete binary tree.&lt;/p&gt;
&lt;h5&gt;Non-Complete Binary Tree&lt;/h5&gt;
&lt;p&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;a&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;b&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;c&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;f&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;g&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Its array representation is &lt;code&gt;[a, b, c, null, null, d, e]&lt;/code&gt; and has gaps, so it is not a complete binary tree.&lt;/p&gt;
&lt;p&gt;Every full binary tree is also a complete binary tree.&lt;/p&gt;
&lt;h3&gt;Heap&lt;/h3&gt;
&lt;p&gt;A heap is a complete binary tree.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Max heap&lt;/strong&gt; is a complete binary tree where every node is greater than or equal to its descendants. The largest node is the root.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Min heap&lt;/strong&gt; is a complete binary tree where every node is smaller than its descendants. The smallest node is the root.&lt;/p&gt;
&lt;h3&gt;Insert&lt;/h3&gt;
&lt;p&gt;We want to insert an element into a max heap:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;8&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;10&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;15&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;16&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;20&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;30&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;50&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Array representation = &lt;code&gt;[50, 30, 20, 15, 10, 8, 16]&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Let’s try inserting &lt;code&gt;60&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The root should have the largest element so the root should be &lt;code&gt;60&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;We need to maintain completeness while inserting.&lt;/p&gt;
&lt;p&gt;We start by inserting &lt;code&gt;60&lt;/code&gt; at the end of the array, which corresponds to the bottom left element of the complete binary tree: &lt;code&gt;[50, 30, 20, 15, 10, 8, 16, 60]&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;8&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;10&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;15&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;16&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;20&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;30&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;50&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;60&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Swap upward with parents until the correct height:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;8&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;10&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;15&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;16&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;20&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;30&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;50&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;60&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;[60, 50, 20, 30, 10, 8, 16, 15]&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;We add the new element as a leaf, then adjust its ancestors upward.&lt;/p&gt;
&lt;p&gt;How much time does it take? The maximum number of swaps equals the height of a complete binary tree, which is &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0197em&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0359em&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;))&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;h3&gt;Delete&lt;/h3&gt;
&lt;p&gt;You should only delete the root element.&lt;/p&gt;
&lt;p&gt;Imagine picking an apple at the top of a pyramid at the supermarket.&lt;/p&gt;
&lt;p&gt;We delete &lt;code&gt;50&lt;/code&gt;:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;8&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;10&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;15&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;16&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;20&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;30&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;50&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;[50, 30, 20, 15, 10, 8, 16]&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Remove 50, and replace with the last element of the binary tree, 16:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;8&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;10&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;15&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;16&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;20&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;30&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;A&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Now we adjust the elements from the root towards the leaf, maintaining the complete binary property.&lt;/p&gt;
&lt;p&gt;Check 16’s child elements. Which child is greater? &lt;code&gt;30&lt;/code&gt;, so swap with &lt;code&gt;30&lt;/code&gt;:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;8&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;10&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;15&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;16&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;20&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;30&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;A&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Check 16’s child elements. Which child is greater? &lt;code&gt;15&lt;/code&gt;, so swap with &lt;code&gt;15&lt;/code&gt;:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;8&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;10&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;15&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;16&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;20&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;30&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;A&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/p&gt;
&lt;h3&gt;Heap Sort&lt;/h3&gt;
&lt;p&gt;If you keep deleting, the next largest element goes to the top in max heap. In min heap the next smallest comes to the top.&lt;/p&gt;
&lt;p&gt;After deleting the largest element, we have a “free space” at the end.&lt;/p&gt;
&lt;p&gt;Before deleting:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;[50, 30, 20, 15, 10, 8, 16]&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;After deleting:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;[30, 16, 20, 15, 10, 8, null]&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;We can keep the element we removed at the end of the array to preserve it:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;[30, 16, 20, 15, 10, 8, 50]&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Let’s delete again, removing 30:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;[20, 16, 10, 15, 8, null, 50]&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;But we preserve 30 at the end of the heap:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;[20, 16, 10, 15, 8, 30, 50]&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;We can see that we’re sorting the array by deleting the largest element, and filling it in at the free space at the end of the new array.&lt;/p&gt;
&lt;h4&gt;How to Do Heap Sort&lt;/h4&gt;
&lt;p&gt;Heap sort has two steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Create a heap from an array by inserting the elements one by one&lt;/li&gt;
&lt;li&gt;Delete the elements one by one&lt;/li&gt;
&lt;/ol&gt;
&lt;h4&gt;Heap Sort Example&lt;/h4&gt;
&lt;h4&gt;Create Heap&lt;/h4&gt;
&lt;p&gt;These are the unsorted set of elements: &lt;code&gt;[10, 20, 15, 30, 40]&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Assume &lt;code&gt;10&lt;/code&gt; is the root of the heap:&lt;/p&gt;
&lt;p&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;10&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Now insert second element &lt;code&gt;20&lt;/code&gt;:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;[10, 20]&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;10&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;20&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;B&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Compare with ancestor, 20 is greater, so swap:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;10&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;20&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;B&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;[20, 10]&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Now insert the third element &lt;code&gt;15&lt;/code&gt;:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;10&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;15&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;20&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Compare with parent, it’s smaller, so we don’t need to adjust.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;[20, 10, 15]&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Now insert the fourth element &lt;code&gt;30&lt;/code&gt;:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;[20, 10, 15, 30]&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;10&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;15&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;20&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;30&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;.&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Adjust the element by comparing to parent, greater than 10 so swap:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;20&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;30&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;15&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;10&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;.&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Adjust the element by comparing to parent, greater than 20 so swap:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;30&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;20&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;15&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;10&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;.&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Sorted, so now elements are &lt;code&gt;[30, 20, 15, 10]&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Now insert the fifth element &lt;code&gt;40&lt;/code&gt;:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;[30, 20, 15, 10, 40]&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;30&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;20&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;15&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;10&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;40&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Compare with parent and swap upward:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;30&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;40&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;15&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;10&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;20&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Swap upward again:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;40&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;30&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;15&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;10&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;20&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Now the heap is &lt;code&gt;[40, 30, 15, 10, 20]&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Every element was inserted at the next free space and moved upward.&lt;/p&gt;
&lt;p&gt;We inserted n elements, each element was moved up the height of the binary tree.&lt;/p&gt;
&lt;p&gt;So we have &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; elements moved up by height &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0197em&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0359em&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, so time complexity to build heap is &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4653em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;∗&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0197em&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0359em&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;h4&gt;Delete All Elements&lt;/h4&gt;
&lt;p&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;40&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;30&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;15&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;10&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;20&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;[40, 20, 15, 10, 20]&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;40 gets deleted and 20 takes its place at the root:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;20&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;30&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;15&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;10&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;.&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;[20, 30, 15, 10]&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Now we need to adjust the binary tree by swapping downward.&lt;/p&gt;
&lt;p&gt;Check which of the children of 20 is greater, then swap.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;30&lt;/code&gt; is greater, so swap &lt;code&gt;20&lt;/code&gt; and &lt;code&gt;30&lt;/code&gt;:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;30&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;20&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;15&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;10&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;.&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Compare &lt;code&gt;20&lt;/code&gt; with &lt;code&gt;10&lt;/code&gt;, don’t need to swap.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;[30, 20, 15, 10]&lt;/code&gt; &lt;code&gt;[40]&lt;/code&gt;, keeping &lt;code&gt;40&lt;/code&gt; at the end.&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;30&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;20&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;15&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;10&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;.&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;30&lt;/code&gt; gets deleted and the last element &lt;code&gt;10&lt;/code&gt; takes its place at the root:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;10&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;20&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;15&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;C&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;[10, 20, 15]&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Now adjust by comparing with children.&lt;/p&gt;
&lt;p&gt;Swap &lt;code&gt;10&lt;/code&gt; with &lt;code&gt;20&lt;/code&gt;:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;20&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;10&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;15&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;C&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Now this is in max heap form, so we stop.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;20, 10, 15&lt;/code&gt; and our reserved elements &lt;code&gt;[30, 40]&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;20&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;10&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;15&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;C&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Now we delete &lt;code&gt;20&lt;/code&gt; and replace with &lt;code&gt;15&lt;/code&gt;:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;15&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;10&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;.&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;We don’t need to adjust since the child is smaller.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;15, 10&lt;/code&gt; is the new heap and our reserved elements &lt;code&gt;[20, 30, 40]&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;15&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;10&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;.&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Now delete &lt;code&gt;15&lt;/code&gt; and replace with &lt;code&gt;10&lt;/code&gt;:&lt;/p&gt;
&lt;p&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;10&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;C&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;We don’t need to adjust since there’s just one element.&lt;/p&gt;
&lt;p&gt;Our heap is &lt;code&gt;[10]&lt;/code&gt; and our reserved elements at the end are &lt;code&gt;[15, 20, 30, 40]&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;So together now the array is sorted: &lt;code&gt;10, 15, 20, 30, 40&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;Heapify&lt;/h3&gt;
&lt;p&gt;Heapify is a procedure for creating a heap from a binary tree.&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;10&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;12&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;15&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;18&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;20&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;25&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;40&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Array representation: &lt;code&gt;[10, 20, 15, 12, 40, 25, 18]&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;It’s similar to creating a heap from scratch. Before we saw when creating a heap from scratch, we insert from the root and adjust down. However, in heapify we adjust upwards.&lt;/p&gt;
&lt;p&gt;We start with a complete binary tree, but it isn’t a max heap.&lt;/p&gt;
&lt;p&gt;In heapify we go from right to left, instead of left to right in creating a heap.&lt;/p&gt;
&lt;p&gt;When going from right to left, we adjust downward, similar to deletion.&lt;/p&gt;
&lt;p&gt;Start with element &lt;code&gt;18&lt;/code&gt; and look at its descendants. It’s a leaf with no children, so alone it is a heap. Continuing on we see the same with &lt;code&gt;25&lt;/code&gt;, &lt;code&gt;40&lt;/code&gt;, and &lt;code&gt;12&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;We get to &lt;code&gt;15&lt;/code&gt; and adjust downwards. We compare it to its children and swap. Which child is greater? &lt;code&gt;25&lt;/code&gt; is greater, so we swap with &lt;code&gt;15&lt;/code&gt;. &lt;code&gt;25&lt;/code&gt; goes up and &lt;code&gt;15&lt;/code&gt; goes down in its place:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;10&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;12&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;15&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;18&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;20&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;25&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;40&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Now we’re on &lt;code&gt;20&lt;/code&gt;. Compare with children. &lt;code&gt;40&lt;/code&gt; is greater, so swap &lt;code&gt;20&lt;/code&gt; with &lt;code&gt;40&lt;/code&gt;:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;10&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;12&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;15&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;18&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;20&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;25&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;40&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Now we get to the first element, the root.&lt;/p&gt;
&lt;p&gt;We compare 40 with its children, and swap 10 with 40:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;10&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;12&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;15&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;18&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;20&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;25&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;40&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;We continue heapifying down, and check &lt;code&gt;10&lt;/code&gt;’s children. &lt;code&gt;20&lt;/code&gt; is greater so we swap with &lt;code&gt;10&lt;/code&gt;:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;labelBkg&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;10&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;12&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;15&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;18&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;20&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;25&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;40&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;What is the time taken by heapify? &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The earlier procedure for creating a heap was &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;∗&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0197em&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0359em&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;))&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, which is slower than heapify.&lt;/p&gt;
&lt;h3&gt;Priority Queue&lt;/h3&gt;
&lt;p&gt;Elements have priority, and are inserted and deleted based on that priority.&lt;/p&gt;
&lt;p&gt;Elements with the highest priority are removed first.&lt;/p&gt;
&lt;p&gt;In a numeric array, the priority is based on the number itself.&lt;/p&gt;
&lt;p&gt;We can say that the highest priority is the smallest number, or we can say the largest number has the highest priority, depending on the use case. We can do either method of priority.&lt;/p&gt;
&lt;p&gt;The time for insert or delete for a regular array is &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; because we have to shift the elements.&lt;/p&gt;
&lt;p&gt;The time for insert or delete for a priority queue is &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0197em&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0359em&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;))&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; which is faster than a normal array.&lt;/p&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Recurrence Relation and Master&apos;s Theorem for Dividing Functions</title><link>https://briansunter.com/recurrence-relation-masters-theorem-dividing</link><guid isPermaLink="true">https://briansunter.com/recurrence-relation-masters-theorem-dividing</guid><description>How to use the Master&apos;s Theorem to figure out the time complexity of divide-and-conquer algorithms like merge sort.</description><pubDate>Thu, 05 Jan 2023 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/recurrence-masters-theorem-cover.CRRmNQ0R_1Em6MY.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Dividing Recurrence Relation 1&lt;/h2&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;js&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; test&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;n&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;  if&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (n &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 1&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    console.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;log&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(n);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;    test&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(n &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 2&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;When a function takes a parameter n, it can make it smaller by either subtracting like &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6667em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; or dividing like &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; or &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.04em;vertical-align:-0.2397em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord sqrt&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8003em&quot;&gt;&lt;span class=&quot;svg-align&quot; style=&quot;top:-3em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot; style=&quot;padding-left:0.833em&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-2.7603em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;hide-tail&quot; style=&quot;min-width:0.853em;height:1.08em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.2397em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Amount of work is &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;Recurrence Relation Dividing&lt;/h3&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:3em;vertical-align:-1.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;minner&quot;&gt;&lt;span class=&quot;mopen delimcenter&quot; style=&quot;top:0em&quot;&gt;&lt;span class=&quot;delimsizing size4&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mtable&quot;&gt;&lt;span class=&quot;col-align-l&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.69em&quot;&gt;&lt;span style=&quot;top:-3.69em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3.008em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-2.25em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3.008em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mspace&quot;&gt; &lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.19em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;arraycolsep&quot; style=&quot;width:1em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;col-align-l&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.69em&quot;&gt;&lt;span style=&quot;top:-3.69em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3.008em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord text&quot;&gt;&lt;span class=&quot;mord&quot;&gt;when &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-2.25em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3.008em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord text&quot;&gt;&lt;span class=&quot;mord&quot;&gt;when &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.19em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;Tree Method&lt;/h3&gt;
&lt;figure&gt;&lt;img alt=&quot;2022-12-09-14-05-14&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1341px) 1341px, 100vw&quot; width=&quot;1341&quot; height=&quot;1309&quot; src=&quot;https://briansunter.com/_astro/2022-12-09-14-05-14.BE5GVghK_Z2on0S7.svg&quot; srcset=&quot;https://briansunter.com/_astro/2022-12-09-14-05-14.BE5GVghK_ZoxPyv.svg 640w, https://briansunter.com/_astro/2022-12-09-14-05-14.BE5GVghK_arThf.svg 750w, https://briansunter.com/_astro/2022-12-09-14-05-14.BE5GVghK_1gpTMp.svg 828w, https://briansunter.com/_astro/2022-12-09-14-05-14.BE5GVghK_Z1Pa9q0.svg 1080w, https://briansunter.com/_astro/2022-12-09-14-05-14.BE5GVghK_Z1jAek5.svg 1280w, https://briansunter.com/_astro/2022-12-09-14-05-14.BE5GVghK_Z2on0S7.svg 1341w&quot; /&gt;&lt;figcaption&gt;2022-12-09-14-05-14&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Each level does 1 unit of work across &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; levels.&lt;/p&gt;
&lt;p&gt;Assuming &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0528em;vertical-align:-0.3574em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mopen nulldelimiter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.6954em&quot;&gt;&lt;span style=&quot;top:-2.6426em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.782em&quot;&gt;&lt;span style=&quot;top:-2.786em;margin-right:0.0714em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.5em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size3 size1 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.23em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line&quot; style=&quot;border-bottom-width:0.04em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.394em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.3574em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, we get &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.8491em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8491em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, which simplifies to &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.207em&quot;&gt;&lt;span style=&quot;top:-2.4559em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.2441em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Since there’s one unit of work per level, the total work equals the number of levels: &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;h3&gt;Substitution Method&lt;/h3&gt;
&lt;p&gt;Starting with &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, we substitute repeatedly:&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0641em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0641em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0641em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0641em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;3&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;3&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Generalizing to &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; iterations: &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0991em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8491em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Assuming &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0528em;vertical-align:-0.3574em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mopen nulldelimiter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.6954em&quot;&gt;&lt;span style=&quot;top:-2.6426em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.782em&quot;&gt;&lt;span style=&quot;top:-2.786em;margin-right:0.0714em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.5em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size3 size1 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.23em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line&quot; style=&quot;border-bottom-width:0.04em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.394em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.3574em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, we get &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.8491em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8491em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; and &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.8889em;vertical-align:-0.1944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Substituting: &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.8889em;vertical-align:-0.1944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7278em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.8889em;vertical-align:-0.1944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Answer: &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;Dividing Recurrence Relation 2&lt;/h2&gt;
&lt;h3&gt;Recurrence Relation&lt;/h3&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:3em;vertical-align:-1.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;minner&quot;&gt;&lt;span class=&quot;mopen delimcenter&quot; style=&quot;top:0em&quot;&gt;&lt;span class=&quot;delimsizing size4&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mtable&quot;&gt;&lt;span class=&quot;col-align-l&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.69em&quot;&gt;&lt;span style=&quot;top:-3.69em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3.008em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-2.25em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3.008em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mspace&quot;&gt; &lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.19em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;arraycolsep&quot; style=&quot;width:1em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;col-align-l&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.69em&quot;&gt;&lt;span style=&quot;top:-3.69em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3.008em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord text&quot;&gt;&lt;span class=&quot;mord&quot;&gt;when &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-2.25em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3.008em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord text&quot;&gt;&lt;span class=&quot;mord&quot;&gt;when &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.19em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;Tree Method&lt;/h3&gt;
&lt;figure&gt;&lt;img alt=&quot;Screenshot 2022-12-11 at 11.52.59 PM&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1320px) 1320px, 100vw&quot; width=&quot;1320&quot; height=&quot;1092&quot; src=&quot;https://briansunter.com/_astro/Screenshot_2022-12-11_at_11.52.59_PM_1670838851213_0.doFy-2My_ZcILIw.webp&quot; srcset=&quot;https://briansunter.com/_astro/Screenshot_2022-12-11_at_11.52.59_PM_1670838851213_0.doFy-2My_Zw6uF0.webp 640w, https://briansunter.com/_astro/Screenshot_2022-12-11_at_11.52.59_PM_1670838851213_0.doFy-2My_Y8mFo.webp 750w, https://briansunter.com/_astro/Screenshot_2022-12-11_at_11.52.59_PM_1670838851213_0.doFy-2My_2wq4tF.webp 828w, https://briansunter.com/_astro/Screenshot_2022-12-11_at_11.52.59_PM_1670838851213_0.doFy-2My_Zchiul.webp 1080w, https://briansunter.com/_astro/Screenshot_2022-12-11_at_11.52.59_PM_1670838851213_0.doFy-2My_Z24CxDd.webp 1280w, https://briansunter.com/_astro/Screenshot_2022-12-11_at_11.52.59_PM_1670838851213_0.doFy-2My_ZcILIw.webp 1320w&quot; /&gt;&lt;figcaption&gt;Screenshot 2022-12-11 at 11.52.59 PM&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Each level does &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0528em;vertical-align:-0.3574em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mopen nulldelimiter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.6954em&quot;&gt;&lt;span style=&quot;top:-2.6426em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.782em&quot;&gt;&lt;span style=&quot;top:-2.786em;margin-right:0.0714em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.5em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size3 size1 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.23em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line&quot; style=&quot;border-bottom-width:0.04em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.394em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.3574em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; amount of work.&lt;/p&gt;
&lt;p&gt;So for each level, &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6667em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0404em;vertical-align:-0.345em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mopen nulldelimiter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.6954em&quot;&gt;&lt;span style=&quot;top:-2.655em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.23em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line&quot; style=&quot;border-bottom-width:0.04em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.394em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.345em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0404em;vertical-align:-0.345em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mopen nulldelimiter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.6954em&quot;&gt;&lt;span style=&quot;top:-2.655em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.7463em&quot;&gt;&lt;span style=&quot;top:-2.786em;margin-right:0.0714em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.5em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size3 size1 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.23em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line&quot; style=&quot;border-bottom-width:0.04em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.394em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.345em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0404em;vertical-align:-0.345em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mopen nulldelimiter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.6954em&quot;&gt;&lt;span style=&quot;top:-2.655em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.7463em&quot;&gt;&lt;span style=&quot;top:-2.786em;margin-right:0.0714em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.5em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size3 size1 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;3&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.23em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line&quot; style=&quot;border-bottom-width:0.04em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.394em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.345em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6667em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;...&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0528em;vertical-align:-0.3574em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mopen nulldelimiter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.6954em&quot;&gt;&lt;span style=&quot;top:-2.6426em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.782em&quot;&gt;&lt;span style=&quot;top:-2.786em;margin-right:0.0714em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.5em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size3 size1 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.23em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line&quot; style=&quot;border-bottom-width:0.04em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.394em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.3574em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:3.1138em;vertical-align:-1.2777em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop op-limits&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.8361em&quot;&gt;&lt;span style=&quot;top:-1.8723em;margin-left:0em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3.05em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;mrel mtight&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3.05em&quot;&gt;&lt;/span&gt;&lt;span&gt;&lt;span class=&quot;mop op-symbol large-op&quot;&gt;∑&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-4.3em;margin-left:0em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3.05em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.2777em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mopen nulldelimiter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.3214em&quot;&gt;&lt;span style=&quot;top:-2.314em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.7507em&quot;&gt;&lt;span style=&quot;top:-2.989em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;i&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.23em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line&quot; style=&quot;border-bottom-width:0.04em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.677em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.686em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;This simplifies to n * 1&lt;/p&gt;
&lt;p&gt;so answer is &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;Substitution Method&lt;/h3&gt;
&lt;p&gt;Starting with &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;:&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0641em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0641em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/2&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0641em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;3&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0641em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/2&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0991em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8491em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0991em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8491em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;mbin mtight&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6667em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;minner&quot;&gt;⋯&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/2&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Assuming &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0528em;vertical-align:-0.3574em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mopen nulldelimiter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.6954em&quot;&gt;&lt;span style=&quot;top:-2.6426em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.782em&quot;&gt;&lt;span style=&quot;top:-2.786em;margin-right:0.0714em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.5em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size3 size1 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.23em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line&quot; style=&quot;border-bottom-width:0.04em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.394em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.3574em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, we get &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.8491em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8491em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; and &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.8889em;vertical-align:-0.1944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.2074em;vertical-align:-0.3574em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;minner&quot;&gt;&lt;span class=&quot;mopen delimcenter&quot; style=&quot;top:0em&quot;&gt;&lt;span class=&quot;delimsizing size1&quot;&gt;[&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mopen nulldelimiter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8451em&quot;&gt;&lt;span style=&quot;top:-2.6426em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.782em&quot;&gt;&lt;span style=&quot;top:-2.786em;margin-right:0.0714em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.5em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size3 size1 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;mbin mtight&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.23em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line&quot; style=&quot;border-bottom-width:0.04em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.394em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.3574em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mopen nulldelimiter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8451em&quot;&gt;&lt;span style=&quot;top:-2.6426em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.782em&quot;&gt;&lt;span style=&quot;top:-2.786em;margin-right:0.0714em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.5em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size3 size1 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;mbin mtight&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.23em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line&quot; style=&quot;border-bottom-width:0.04em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.394em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.3574em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;minner&quot;&gt;⋯&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mopen nulldelimiter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8451em&quot;&gt;&lt;span style=&quot;top:-2.655em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.23em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line&quot; style=&quot;border-bottom-width:0.04em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.394em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.345em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose delimcenter&quot; style=&quot;top:0em&quot;&gt;&lt;span class=&quot;delimsizing size1&quot;&gt;]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7278em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4445em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;⋅&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7278em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Answer: &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;Dividing Recurrence Relation 3&lt;/h2&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;js&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; test&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;n&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;  if&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (n &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 1&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;    for&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;let&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; i &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 0&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;; i &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; n; i&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;++&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;      console.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;log&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(n);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;    test&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(n &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 2&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;    test&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(n &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 2&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The recurrence relation is &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:3em;vertical-align:-1.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;minner&quot;&gt;&lt;span class=&quot;mopen delimcenter&quot; style=&quot;top:0em&quot;&gt;&lt;span class=&quot;delimsizing size4&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mtable&quot;&gt;&lt;span class=&quot;col-align-l&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.69em&quot;&gt;&lt;span style=&quot;top:-3.69em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3.008em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-2.25em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3.008em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mspace&quot;&gt; &lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.19em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;arraycolsep&quot; style=&quot;width:1em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;col-align-l&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.69em&quot;&gt;&lt;span style=&quot;top:-3.69em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3.008em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord text&quot;&gt;&lt;span class=&quot;mord&quot;&gt;when &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-2.25em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3.008em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord text&quot;&gt;&lt;span class=&quot;mord&quot;&gt;when &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.19em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;Tree Method&lt;/h3&gt;
&lt;figure&gt;&lt;img alt=&quot;2022-12-04-19-48-18&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 2090px) 2090px, 100vw&quot; width=&quot;2090&quot; height=&quot;1210&quot; src=&quot;https://briansunter.com/_astro/2022-12-04-19-48-18.B_OzntvO_ZuISbM.svg&quot; srcset=&quot;https://briansunter.com/_astro/2022-12-04-19-48-18.B_OzntvO_2jcYHX.svg 640w, https://briansunter.com/_astro/2022-12-04-19-48-18.B_OzntvO_ZYjtNc.svg 750w, https://briansunter.com/_astro/2022-12-04-19-48-18.B_OzntvO_Z1bTGwp.svg 828w, https://briansunter.com/_astro/2022-12-04-19-48-18.B_OzntvO_2kgxGX.svg 1080w, https://briansunter.com/_astro/2022-12-04-19-48-18.B_OzntvO_xmQ1N.svg 1280w, https://briansunter.com/_astro/2022-12-04-19-48-18.B_OzntvO_1aaCSn.svg 1668w, https://briansunter.com/_astro/2022-12-04-19-48-18.B_OzntvO_Z1PlVvD.svg 2048w, https://briansunter.com/_astro/2022-12-04-19-48-18.B_OzntvO_ZuISbM.svg 2090w&quot; /&gt;&lt;figcaption&gt;2022-12-04-19-48-18&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Each row adds up to &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; amount of work: the 2nd row has two &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;s, the 3rd row has four &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/4&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;s, and so on. Each row contributes &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0528em;vertical-align:-0.3574em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mopen nulldelimiter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.6954em&quot;&gt;&lt;span style=&quot;top:-2.6426em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.782em&quot;&gt;&lt;span style=&quot;top:-2.786em;margin-right:0.0714em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.5em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size3 size1 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.23em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line&quot; style=&quot;border-bottom-width:0.04em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.394em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.3574em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;⋅&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.8491em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8491em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; work.&lt;/p&gt;
&lt;p&gt;Assuming &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0528em;vertical-align:-0.3574em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mopen nulldelimiter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.6954em&quot;&gt;&lt;span style=&quot;top:-2.6426em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.782em&quot;&gt;&lt;span style=&quot;top:-2.786em;margin-right:0.0714em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.5em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size3 size1 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.23em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line&quot; style=&quot;border-bottom-width:0.04em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.394em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.3574em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, we get &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.8491em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8491em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; and &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.8889em;vertical-align:-0.1944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Since &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; work is done across &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.8889em;vertical-align:-0.1944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; levels, the total work is &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4445em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;⋅&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.8889em;vertical-align:-0.1944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;h3&gt;Substitution Method&lt;/h3&gt;
&lt;p&gt;Starting with &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, we substitute &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0641em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;:&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0641em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0641em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Continuing for &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; iterations: &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.8491em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8491em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;⋅&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0991em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8491em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Assuming &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0991em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8491em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, we get &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0528em;vertical-align:-0.3574em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mopen nulldelimiter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.6954em&quot;&gt;&lt;span style=&quot;top:-2.6426em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.782em&quot;&gt;&lt;span style=&quot;top:-2.786em;margin-right:0.0714em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.5em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size3 size1 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.23em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line&quot; style=&quot;border-bottom-width:0.04em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.394em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.3574em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; and &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.8889em;vertical-align:-0.1944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;h2&gt;Master’s Theorem for Dividing Functions&lt;/h2&gt;
&lt;p&gt;For recurrences of the form &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4445em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;⋅&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;b&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1076em&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; where &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7719em;vertical-align:-0.136em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;≥&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7335em;vertical-align:-0.0391em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;b&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, and &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1076em&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0991em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8491em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;⋅&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.7487em&quot;&gt;&lt;span style=&quot;top:-3.1473em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;p&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;:&lt;/p&gt;
&lt;h3&gt;Case 1: &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.242em&quot;&gt;&lt;span style=&quot;top:-2.4559em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;b&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.2441em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;Then &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.138em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.888em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mop mtight&quot;&gt;&lt;span class=&quot;mop mtight&quot;&gt;&lt;span class=&quot;mtight&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;mtight&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;mtight&quot; style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.2302em&quot;&gt;&lt;span style=&quot;top:-2.2341em;margin-right:0.0714em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.5em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size3 size1 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;b&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.2659em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mopen mtight&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;mclose mtight&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;Case 2: &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.242em&quot;&gt;&lt;span style=&quot;top:-2.4559em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;b&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.2441em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Case 2.1:&lt;/strong&gt; If &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7335em;vertical-align:-0.1944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7278em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, then &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0991em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8491em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;⋅&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.1484em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8984em&quot;&gt;&lt;span style=&quot;top:-3.1473em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;mbin mtight&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Case 2.2:&lt;/strong&gt; If &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.625em;vertical-align:-0.1944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7278em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, then &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0991em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8491em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;⋅&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;))&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Case 2.3:&lt;/strong&gt; If &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7335em;vertical-align:-0.1944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7278em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, then &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0991em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8491em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Case 3: &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.242em&quot;&gt;&lt;span style=&quot;top:-2.4559em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;b&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.2441em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Case 3.1:&lt;/strong&gt; If &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.8304em;vertical-align:-0.1944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;≥&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, then &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0991em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8491em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;⋅&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.7487em&quot;&gt;&lt;span style=&quot;top:-3.1473em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;p&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Case 3.2:&lt;/strong&gt; If &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7335em;vertical-align:-0.1944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, then &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0991em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8491em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Examples&lt;/h3&gt;
&lt;h4&gt;Case 1&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Example 1:&lt;/strong&gt; &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Here &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;b&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, and &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1076em&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0641em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;⋅&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0641em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, so &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; and &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.625em;vertical-align:-0.1944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Since &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.207em&quot;&gt;&lt;span style=&quot;top:-2.4559em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.2441em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6835em;vertical-align:-0.0391em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, this is case 1. Answer: &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Example 2:&lt;/strong&gt; &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Here &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.207em&quot;&gt;&lt;span style=&quot;top:-2.4559em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.2441em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.625em;vertical-align:-0.1944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;. Since &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.207em&quot;&gt;&lt;span style=&quot;top:-2.4559em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.2441em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6835em;vertical-align:-0.0391em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, this is case 1. Answer: &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0641em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Example 3:&lt;/strong&gt; &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Here &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.207em&quot;&gt;&lt;span style=&quot;top:-2.4559em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.2441em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6835em;vertical-align:-0.0391em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;. Case 1, so &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0641em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;3&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Example 4:&lt;/strong&gt; &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.8141em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Here &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.207em&quot;&gt;&lt;span style=&quot;top:-2.4559em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.2441em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6835em;vertical-align:-0.0391em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;. Still case 1, so &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0641em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;3&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Example 5:&lt;/strong&gt; &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;9&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/3&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Here &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.207em&quot;&gt;&lt;span style=&quot;top:-2.4559em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;3&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.2441em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;9&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6835em;vertical-align:-0.0391em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;. Case 1, so &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0641em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h4&gt;Case 2&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Example 1:&lt;/strong&gt; &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Here &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.207em&quot;&gt;&lt;span style=&quot;top:-2.4559em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.2441em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; and &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, so they’re equal (case 2). Since &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1076em&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; has no &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; term, &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.625em;vertical-align:-0.1944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;. Answer: &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Example 2:&lt;/strong&gt; &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.8141em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Here &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.207em&quot;&gt;&lt;span style=&quot;top:-2.4559em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.2441em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, so case 2 with &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.625em;vertical-align:-0.1944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;. Answer: &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0641em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Example 3:&lt;/strong&gt; &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0085em;vertical-align:-0.1944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Here &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.207em&quot;&gt;&lt;span style=&quot;top:-2.4559em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.2441em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, so case 2 with &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.625em;vertical-align:-0.1944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;. Answer: &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.1484em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8984em&quot;&gt;&lt;span style=&quot;top:-3.1473em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Example 4:&lt;/strong&gt; &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.8141em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;3&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Here &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.207em&quot;&gt;&lt;span style=&quot;top:-2.4559em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.2441em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, so case 2 with &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.625em;vertical-align:-0.1944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;. Answer: &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0641em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;3&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Example 5:&lt;/strong&gt; &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.1765em;vertical-align:-0.4811em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mopen nulldelimiter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.6954em&quot;&gt;&lt;span style=&quot;top:-2.655em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mop mtight&quot;&gt;&lt;span class=&quot;mtight&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;mtight&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;mtight&quot; style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace mtight&quot; style=&quot;margin-right:0.1952em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.23em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line&quot; style=&quot;border-bottom-width:0.04em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.394em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.4811em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Note that &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.1765em;vertical-align:-0.4811em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mopen nulldelimiter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.6954em&quot;&gt;&lt;span style=&quot;top:-2.655em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mop mtight&quot;&gt;&lt;span class=&quot;mtight&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;mtight&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;mtight&quot; style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace mtight&quot; style=&quot;margin-right:0.1952em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.23em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line&quot; style=&quot;border-bottom-width:0.04em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.394em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.4811em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4445em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;⋅&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0641em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;. Here &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.207em&quot;&gt;&lt;span style=&quot;top:-2.4559em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.2441em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; and &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.625em;vertical-align:-0.1944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7278em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; (in denominator), so case 2.2. Answer: &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;))&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Example 6:&lt;/strong&gt; &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.2028em;vertical-align:-0.5074em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mopen nulldelimiter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.6954em&quot;&gt;&lt;span style=&quot;top:-2.6287em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mop mtight&quot;&gt;&lt;span class=&quot;mop mtight&quot;&gt;&lt;span class=&quot;mtight&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;mtight&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;mtight&quot; style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8019em&quot;&gt;&lt;span style=&quot;top:-2.8416em;margin-right:0.0714em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.5em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size3 size1 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace mtight&quot; style=&quot;margin-right:0.1952em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.23em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line&quot; style=&quot;border-bottom-width:0.04em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.394em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.5074em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Here &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.207em&quot;&gt;&lt;span style=&quot;top:-2.4559em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.2441em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; and &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.625em;vertical-align:-0.1944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7278em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; (in denominator), so case 2.3. Answer: &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h4&gt;Case 3&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Example 1:&lt;/strong&gt; &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.8141em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Here &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.207em&quot;&gt;&lt;span style=&quot;top:-2.4559em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.2441em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6835em;vertical-align:-0.0391em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, so case 3.1. Answer: &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0641em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Example 2:&lt;/strong&gt; &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0085em;vertical-align:-0.1944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Here &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.207em&quot;&gt;&lt;span style=&quot;top:-2.4559em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.2441em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6835em;vertical-align:-0.0391em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, so case 3.1 (take the entire &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1076em&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;). Answer: &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0641em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Example 3:&lt;/strong&gt; &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.499em;vertical-align:-0.4811em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mopen nulldelimiter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.0179em&quot;&gt;&lt;span style=&quot;top:-2.655em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mop mtight&quot;&gt;&lt;span class=&quot;mtight&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;mtight&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;mtight&quot; style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace mtight&quot; style=&quot;margin-right:0.1952em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.23em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line&quot; style=&quot;border-bottom-width:0.04em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.394em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8913em&quot;&gt;&lt;span style=&quot;top:-2.931em;margin-right:0.0714em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.5em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size3 size1 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;3&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.4811em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Here &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.207em&quot;&gt;&lt;span style=&quot;top:-2.4559em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.2441em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6835em;vertical-align:-0.0391em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;3&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;. Since log is in the denominator, this is case 3.2 (just take &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.8491em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8491em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;). Answer: &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0641em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;3&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;Master’s Theorem Summary Tables&lt;/h2&gt;
&lt;h3&gt;Case 1: &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.242em&quot;&gt;&lt;span style=&quot;top:-2.4559em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;b&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.2441em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;





























&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Recurrence&lt;/th&gt;&lt;th&gt;Result&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0641em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0641em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.8141em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0641em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;3&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;16&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.8141em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0641em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;4&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;h3&gt;Case 2: &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.242em&quot;&gt;&lt;span style=&quot;top:-2.4559em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;b&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.2441em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;





































&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Recurrence&lt;/th&gt;&lt;th&gt;Result&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.8889em;vertical-align:-0.1944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.1484em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8984em&quot;&gt;&lt;span style=&quot;top:-3.1473em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.8141em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0641em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0641em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.1484em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8984em&quot;&gt;&lt;span style=&quot;top:-3.1473em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;3&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.1765em;vertical-align:-0.4811em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mopen nulldelimiter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.6954em&quot;&gt;&lt;span style=&quot;top:-2.655em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mop mtight&quot;&gt;&lt;span class=&quot;mtight&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;mtight&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;mtight&quot; style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace mtight&quot; style=&quot;margin-right:0.1952em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.23em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line&quot; style=&quot;border-bottom-width:0.04em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.394em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.4811em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;))&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.2028em;vertical-align:-0.5074em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mopen nulldelimiter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.6954em&quot;&gt;&lt;span style=&quot;top:-2.6287em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mop mtight&quot;&gt;&lt;span class=&quot;mop mtight&quot;&gt;&lt;span class=&quot;mtight&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;mtight&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;mtight&quot; style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8019em&quot;&gt;&lt;span style=&quot;top:-2.8416em;margin-right:0.0714em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.5em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size3 size1 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace mtight&quot; style=&quot;margin-right:0.1952em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.23em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line&quot; style=&quot;border-bottom-width:0.04em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.394em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.5074em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;h3&gt;Case 3: &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.242em&quot;&gt;&lt;span style=&quot;top:-2.4559em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;b&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.2441em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;





























&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Recurrence&lt;/th&gt;&lt;th&gt;Result&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.8141em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0641em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0085em;vertical-align:-0.1944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0641em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0929em;vertical-align:-0.1944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;3&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8984em&quot;&gt;&lt;span style=&quot;top:-3.1473em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.1484em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;3&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8984em&quot;&gt;&lt;span style=&quot;top:-3.1473em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.499em;vertical-align:-0.4811em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mopen nulldelimiter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.0179em&quot;&gt;&lt;span style=&quot;top:-2.655em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mop mtight&quot;&gt;&lt;span class=&quot;mtight&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;mtight&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;mtight&quot; style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace mtight&quot; style=&quot;margin-right:0.1952em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.23em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line&quot; style=&quot;border-bottom-width:0.04em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.394em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8913em&quot;&gt;&lt;span style=&quot;top:-2.931em;margin-right:0.0714em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.5em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size3 size1 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.4811em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0641em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;h2&gt;Root Function (Recurrence Relation)&lt;/h2&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;js&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; test&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;n&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;){&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;  if&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(n&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    stmt&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;    test&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(Math.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;sqrt&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(n))&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:3em;vertical-align:-1.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;minner&quot;&gt;&lt;span class=&quot;mopen delimcenter&quot; style=&quot;top:0em&quot;&gt;&lt;span class=&quot;delimsizing size4&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mtable&quot;&gt;&lt;span class=&quot;col-align-l&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.69em&quot;&gt;&lt;span style=&quot;top:-3.69em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3.008em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-2.25em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3.008em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mspace&quot;&gt; &lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord sqrt&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8003em&quot;&gt;&lt;span class=&quot;svg-align&quot; style=&quot;top:-3em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot; style=&quot;padding-left:0.833em&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-2.7603em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;hide-tail&quot; style=&quot;min-width:0.853em;height:1.08em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.2397em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.19em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;arraycolsep&quot; style=&quot;width:1em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;col-align-l&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.69em&quot;&gt;&lt;span style=&quot;top:-3.69em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3.008em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord text&quot;&gt;&lt;span class=&quot;mord&quot;&gt;when &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-2.25em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3.008em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord text&quot;&gt;&lt;span class=&quot;mord&quot;&gt;when &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.19em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Expanding by substitution:&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.138em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.888em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;1/2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.138em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.888em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;1/4&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.138em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.888em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;1/8&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;3&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Generalizing to &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; iterations: &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.2619em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.0119em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;1/&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.927em&quot;&gt;&lt;span style=&quot;top:-2.931em;margin-right:0.0714em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.5em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size3 size1 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Let &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6644em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.6644em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;m&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;. Then &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.6644em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;m&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.2619em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.0119em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;m&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.927em&quot;&gt;&lt;span style=&quot;top:-2.931em;margin-right:0.0714em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.5em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size3 size1 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Assuming &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.2619em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.0119em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;m&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.927em&quot;&gt;&lt;span style=&quot;top:-2.931em;margin-right:0.0714em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.5em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size3 size1 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, we need &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0991em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;m&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8491em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, so &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;m&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.8491em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8491em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; and &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.207em&quot;&gt;&lt;span style=&quot;top:-2.4559em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.2441em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;m&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Since &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6644em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.6644em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;m&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, we have &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;m&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.207em&quot;&gt;&lt;span style=&quot;top:-2.4559em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.2441em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, giving us &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Answer: &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;))&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Recurrence Relation and Master&apos;s Theorem for Subtracting Functions</title><link>https://briansunter.com/recurrence-relation-masters-theorem-subtracting</link><guid isPermaLink="true">https://briansunter.com/recurrence-relation-masters-theorem-subtracting</guid><description>The math behind figuring out time complexity for recursive algorithms using recurrence relations.</description><pubDate>Thu, 05 Jan 2023 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/recurrence-subtracting-cover.BTzA2BcF_l8h.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Divide and Conquer&lt;/h2&gt;
&lt;p&gt;If a problem is large, divide the problem into subproblems, solve them, then recombine the solutions.&lt;/p&gt;
&lt;p&gt;The subproblems should be the same type of problems. For example, if the main problem is sorting, then the subproblems are sorting.&lt;/p&gt;
&lt;h3&gt;Examples of Divide and Conquer Problems&lt;/h3&gt;
&lt;p&gt;Binary search&lt;/p&gt;
&lt;p&gt;Finding Maximum and Minimum&lt;/p&gt;
&lt;p&gt;Merge Sort&lt;/p&gt;
&lt;p&gt;Quick Sort&lt;/p&gt;
&lt;p&gt;Strassen’s Matrix Multiplication&lt;/p&gt;
&lt;h2&gt;Subtraction Recurrence Relation 1&lt;/h2&gt;
&lt;h3&gt;Recursive function example&lt;/h3&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;js&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; test&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;n&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;  if&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (n &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 0&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    console.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;log&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(n);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;    test&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(n &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 1&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;How many times is this function called?&lt;/p&gt;
&lt;p&gt;&lt;code&gt;test(3)&lt;/code&gt; -&amp;gt; prints “3”&lt;/p&gt;
&lt;p&gt;&lt;code&gt;test(2)&lt;/code&gt; -&amp;gt; prints “2”&lt;/p&gt;
&lt;p&gt;&lt;code&gt;test(1)&lt;/code&gt; -&amp;gt; prints “1”&lt;/p&gt;
&lt;p&gt;&lt;code&gt;test(0)&lt;/code&gt; -&amp;gt; does not print, or call itself again, since n is not greater than 0&lt;/p&gt;
&lt;p&gt;Does work (printing) 3 times, but calls itself 4 times, where it doesn’t print on the last time.&lt;/p&gt;
&lt;p&gt;If printing is one unit of time, then this takes 3 units of time.&lt;/p&gt;
&lt;p&gt;So if you pass &lt;code&gt;n&lt;/code&gt; it will make &lt;code&gt;n+1&lt;/code&gt; calls, and print &lt;code&gt;n&lt;/code&gt; times.&lt;/p&gt;
&lt;p&gt;The time depends on the number of calls, so time complexity is &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;How do we find the recurrence relation?&lt;/p&gt;
&lt;span class=&quot;katex-display&quot;&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:3em;vertical-align:-1.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;minner&quot;&gt;&lt;span class=&quot;mopen delimcenter&quot; style=&quot;top:0em&quot;&gt;&lt;span class=&quot;delimsizing size4&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mtable&quot;&gt;&lt;span class=&quot;col-align-l&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.69em&quot;&gt;&lt;span style=&quot;top:-3.69em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3.008em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-2.25em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3.008em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mspace&quot;&gt; &lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.19em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;arraycolsep&quot; style=&quot;width:1em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;col-align-l&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.69em&quot;&gt;&lt;span style=&quot;top:-3.69em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3.008em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord text&quot;&gt;&lt;span class=&quot;mord&quot;&gt;when &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-2.25em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3.008em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord text&quot;&gt;&lt;span class=&quot;mord&quot;&gt;when &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.19em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;h4&gt;Deriving &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; by substitution&lt;/h4&gt;
&lt;p&gt;Starting with &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, we substitute repeatedly to find a pattern.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In terms of &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;:&lt;/strong&gt; Substituting &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6667em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; gives &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, so:
&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In terms of &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;:&lt;/strong&gt; Similarly, &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, so:
&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;3&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Generalizing to &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; steps:&lt;/strong&gt; &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;We know &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;. Assuming &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6667em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; (so &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;):
&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7278em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;Subtraction Recurrence Relation 2&lt;/h2&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;js&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; test&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;n&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;  if&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (n &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 0&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;    for&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;let&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; i &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 0&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;; i &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; n; i&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;++&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;      console.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;log&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(n);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;    test&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(n &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 1&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Recurrence relation is &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:3em;vertical-align:-1.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;minner&quot;&gt;&lt;span class=&quot;mopen delimcenter&quot; style=&quot;top:0em&quot;&gt;&lt;span class=&quot;delimsizing size4&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mtable&quot;&gt;&lt;span class=&quot;col-align-l&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.69em&quot;&gt;&lt;span style=&quot;top:-3.69em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3.008em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-2.25em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3.008em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mspace&quot;&gt; &lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.19em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;arraycolsep&quot; style=&quot;width:1em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;col-align-l&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.69em&quot;&gt;&lt;span style=&quot;top:-3.69em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3.008em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord text&quot;&gt;&lt;span class=&quot;mord&quot;&gt;when &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-2.25em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3.008em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord text&quot;&gt;&lt;span class=&quot;mord&quot;&gt;when &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.19em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;For each iteration, it takes &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; units of time, then calls itself -1.&lt;/p&gt;
&lt;h3&gt;Tree Method&lt;/h3&gt;
&lt;figure&gt;&lt;img alt=&quot;2022-12-01-13-33-20&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1418px) 1418px, 100vw&quot; width=&quot;1418&quot; height=&quot;1311&quot; src=&quot;https://briansunter.com/_astro/2022-12-01-13-33-20.Clu0M6oJ_Z1MVtj.svg&quot; srcset=&quot;https://briansunter.com/_astro/2022-12-01-13-33-20.Clu0M6oJ_16QNok.svg 640w, https://briansunter.com/_astro/2022-12-01-13-33-20.Clu0M6oJ_jDkn9.svg 750w, https://briansunter.com/_astro/2022-12-01-13-33-20.Clu0M6oJ_15IqE1.svg 828w, https://briansunter.com/_astro/2022-12-01-13-33-20.Clu0M6oJ_2wJgot.svg 1080w, https://briansunter.com/_astro/2022-12-01-13-33-20.Clu0M6oJ_g2VI1.svg 1280w, https://briansunter.com/_astro/2022-12-01-13-33-20.Clu0M6oJ_Z1MVtj.svg 1418w&quot; /&gt;&lt;figcaption&gt;2022-12-01-13-33-20&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;We can see the amount of work is &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6667em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;...&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;To find the total amount of work we can use the &lt;a href=&quot;https://briansunter.com/integer-sum-formula&quot;&gt;integer-sum-formula&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.104em;vertical-align:-0.2997em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;&lt;span class=&quot;mop op-symbol small-op&quot; style=&quot;position:relative;top:0em&quot;&gt;∑&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8043em&quot;&gt;&lt;span style=&quot;top:-2.4003em;margin-left:0em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;mrel mtight&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.2029em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.2997em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.355em;vertical-align:-0.345em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mopen nulldelimiter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.01em&quot;&gt;&lt;span style=&quot;top:-2.655em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.23em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line&quot; style=&quot;border-bottom-width:0.04em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.485em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mopen mtight&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mbin mtight&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose mtight&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.345em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;This simplifies to &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0641em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; for measuring time complexity.&lt;/p&gt;
&lt;h3&gt;Substitution Method&lt;/h3&gt;
&lt;p&gt;Starting with &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, we substitute repeatedly:&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6667em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6684em;vertical-align:-0.024em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;⟹&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6667em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6667em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6684em;vertical-align:-0.024em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;⟹&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Continuing for &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; iterations:
&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7778em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7778em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6667em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;minner&quot;&gt;⋯&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Assuming &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6667em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; (so &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;):
&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7278em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7278em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7278em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6667em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;minner&quot;&gt;⋯&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Using the integer-sum-formula|integer sum formula &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.104em;vertical-align:-0.2997em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;&lt;span class=&quot;mop op-symbol small-op&quot; style=&quot;position:relative;top:0em&quot;&gt;∑&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8043em&quot;&gt;&lt;span style=&quot;top:-2.4003em;margin-left:0em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;mrel mtight&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.2029em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.2997em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.355em;vertical-align:-0.345em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mopen nulldelimiter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.01em&quot;&gt;&lt;span style=&quot;top:-2.655em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.23em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line&quot; style=&quot;border-bottom-width:0.04em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.485em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mopen mtight&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mbin mtight&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose mtight&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.345em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; and &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;:
&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7278em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.355em;vertical-align:-0.345em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mopen nulldelimiter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.01em&quot;&gt;&lt;span style=&quot;top:-2.655em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.23em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line&quot; style=&quot;border-bottom-width:0.04em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.485em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mopen mtight&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mbin mtight&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose mtight&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.345em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0641em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;Subtraction Recurrence Relation 3&lt;/h2&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;js&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; test&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;n&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;  if&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (n &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 0&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;    for&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;let&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; i &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 1&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;; i &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; n; i &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; i &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 2&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;      console.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;log&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(n);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;    test&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(n &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 1&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;We know &lt;code&gt;(let i=1; i&amp;lt; n; i=i*2)&lt;/code&gt; will execute &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0197em&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0359em&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; times.&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:3em;vertical-align:-1.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;minner&quot;&gt;&lt;span class=&quot;mopen delimcenter&quot; style=&quot;top:0em&quot;&gt;&lt;span class=&quot;delimsizing size4&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mtable&quot;&gt;&lt;span class=&quot;col-align-l&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.69em&quot;&gt;&lt;span style=&quot;top:-3.69em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3.008em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-2.25em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3.008em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mspace&quot;&gt; &lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0197em&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0359em&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.19em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;arraycolsep&quot; style=&quot;width:1em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;col-align-l&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.69em&quot;&gt;&lt;span style=&quot;top:-3.69em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3.008em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord text&quot;&gt;&lt;span class=&quot;mord&quot;&gt;when &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-2.25em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3.008em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord text&quot;&gt;&lt;span class=&quot;mord&quot;&gt;when &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.19em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;Tree Method&lt;/h3&gt;
&lt;figure&gt;&lt;img alt=&quot;2022-12-05-15-12-40&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1069px) 1069px, 100vw&quot; width=&quot;1069&quot; height=&quot;1260&quot; src=&quot;https://briansunter.com/_astro/2022-12-05-15-12-40.B39W83Sw_2rXTTj.svg&quot; srcset=&quot;https://briansunter.com/_astro/2022-12-05-15-12-40.B39W83Sw_Z134eLB.svg 640w, https://briansunter.com/_astro/2022-12-05-15-12-40.B39W83Sw_ZR8XXp.svg 750w, https://briansunter.com/_astro/2022-12-05-15-12-40.B39W83Sw_laWMf.svg 828w, https://briansunter.com/_astro/2022-12-05-15-12-40.B39W83Sw_2rXTTj.svg 1069w&quot; /&gt;&lt;figcaption&gt;2022-12-05-15-12-40&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Amount of work is &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0197em&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0359em&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0197em&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0359em&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6667em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;...&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0197em&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0359em&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0197em&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0359em&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0197em&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0359em&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;⋅&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;⋅&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;⋅&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4445em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;...&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;⋅&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;⋅&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0197em&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0359em&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;!)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; -&amp;gt; log n factorial&lt;/p&gt;
&lt;p&gt;Equivalent to &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0197em&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0359em&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;))&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;Substitution method&lt;/h3&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0197em&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0359em&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Plug in n-2&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0197em&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0359em&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)]&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0197em&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0359em&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0197em&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0359em&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)]&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0197em&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0359em&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0197em&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0359em&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Assume &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6667em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, therefore &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0197em&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0359em&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0197em&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0359em&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6667em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;...&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0197em&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0359em&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0197em&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0359em&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Simplifies to&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0197em&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0359em&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;!)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7278em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0197em&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0359em&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;!)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0197em&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0359em&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;))&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;Directly Get Answer&lt;/h3&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; -&amp;gt; &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; -&amp;gt; &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0641em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0197em&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0359em&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; -&amp;gt; &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0197em&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0359em&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;))&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.8141em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; -&amp;gt; &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0641em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;3&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Just multiply the term after the + by n, since you know it will be repeated n times via recursion.&lt;/p&gt;
&lt;p&gt;What if it’s not decreasing by 1? It still works.&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; -&amp;gt; &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; -&amp;gt; &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;100&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; -&amp;gt; &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0641em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;However, if there’s a coefficient on the function, it’s different though. &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;∗&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;Subtraction Recurrence Relation 4&lt;/h2&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;js&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; test&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;n&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;  if&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (n &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 0&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    console.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;log&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(n);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;    test&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(n &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 1&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;    test&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(n &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 1&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:3em;vertical-align:-1.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;minner&quot;&gt;&lt;span class=&quot;mopen delimcenter&quot; style=&quot;top:0em&quot;&gt;&lt;span class=&quot;delimsizing size4&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mtable&quot;&gt;&lt;span class=&quot;col-align-l&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.69em&quot;&gt;&lt;span style=&quot;top:-3.69em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3.008em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-2.25em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3.008em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mspace&quot;&gt; &lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.19em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;arraycolsep&quot; style=&quot;width:1em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;col-align-l&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.69em&quot;&gt;&lt;span style=&quot;top:-3.69em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3.008em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord text&quot;&gt;&lt;span class=&quot;mord&quot;&gt;when &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-2.25em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3.008em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord text&quot;&gt;&lt;span class=&quot;mord&quot;&gt;when &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.19em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;Tree Method&lt;/h3&gt;
&lt;figure&gt;&lt;img alt=&quot;2022-12-06-13-53-46&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 2364px) 2364px, 100vw&quot; width=&quot;2364&quot; height=&quot;914&quot; src=&quot;https://briansunter.com/_astro/2022-12-06-13-53-46.BDO3bSrX_2r88cX.svg&quot; srcset=&quot;https://briansunter.com/_astro/2022-12-06-13-53-46.BDO3bSrX_1BliXK.svg 640w, https://briansunter.com/_astro/2022-12-06-13-53-46.BDO3bSrX_1jSDq7.svg 750w, https://briansunter.com/_astro/2022-12-06-13-53-46.BDO3bSrX_JUMnW.svg 828w, https://briansunter.com/_astro/2022-12-06-13-53-46.BDO3bSrX_1Cuj74.svg 1080w, https://briansunter.com/_astro/2022-12-06-13-53-46.BDO3bSrX_Z2m4WbV.svg 1280w, https://briansunter.com/_astro/2022-12-06-13-53-46.BDO3bSrX_ZXnfVT.svg 1668w, https://briansunter.com/_astro/2022-12-06-13-53-46.BDO3bSrX_1STSeh.svg 2048w, https://briansunter.com/_astro/2022-12-06-13-53-46.BDO3bSrX_2r88cX.svg 2364w&quot; /&gt;&lt;figcaption&gt;2022-12-06-13-53-46&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;function called twice in first row&lt;/p&gt;
&lt;p&gt;4 times in second row&lt;/p&gt;
&lt;p&gt;8 times in third row&lt;/p&gt;
&lt;p&gt;So the work done in each row is &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.8491em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8491em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7278em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7278em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.8974em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.8974em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;3&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6667em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;...&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.8491em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8491em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.9324em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8491em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;mbin mtight&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6667em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6667em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;r&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.8974em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;r&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.8974em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;r&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;3&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6667em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;...&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.8491em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;r&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8491em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.5373em;vertical-align:-0.4033em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mopen nulldelimiter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.1339em&quot;&gt;&lt;span style=&quot;top:-2.655em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0278em&quot;&gt;r&lt;/span&gt;&lt;span class=&quot;mbin mtight&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.23em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line&quot; style=&quot;border-bottom-width:0.04em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.485em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;mopen mtight&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0278em&quot;&gt;r&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.927em&quot;&gt;&lt;span style=&quot;top:-2.931em;margin-right:0.0714em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.5em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size3 size1 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;mbin mtight&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mbin mtight&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose mtight&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.4033em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;In the series above, &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; and &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;r&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;So we can use the formula above to find the answer for our tree&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.5373em;vertical-align:-0.4033em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mopen nulldelimiter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.1339em&quot;&gt;&lt;span style=&quot;top:-2.655em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mbin mtight&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.23em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line&quot; style=&quot;border-bottom-width:0.04em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.485em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mopen mtight&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.927em&quot;&gt;&lt;span style=&quot;top:-2.931em;margin-right:0.0714em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.5em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size3 size1 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;mbin mtight&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mbin mtight&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose mtight&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.4033em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Simplifies to &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.9324em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8491em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;mbin mtight&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Assume &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6667em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, so &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.8974em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mbin mtight&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;So Big O is &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.6644em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;Substitution Method&lt;/h3&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0641em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7278em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0641em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7278em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0641em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;3&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.8974em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7278em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0991em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8491em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.9324em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8491em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;mbin mtight&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.9324em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8491em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;mbin mtight&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6667em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;...&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.8974em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7278em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Assume &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6667em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.6644em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7278em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7278em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.8974em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6667em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;...&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.8491em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8491em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;mbin mtight&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6644em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.6644em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;∗&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7278em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.9324em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8491em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7477em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.6644em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7477em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.6644em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.8974em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mbin mtight&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.6644em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;Master’s Theorem for Subtracting Functions&lt;/h2&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; -&amp;gt; &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; -&amp;gt; &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0641em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0197em&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0359em&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; -&amp;gt; &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0197em&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0359em&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;))&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; -&amp;gt; &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.6644em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; -&amp;gt; &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.6644em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; -&amp;gt; &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;∗&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.6644em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;Master’s Theorem&lt;/h3&gt;
&lt;p&gt;General form of recurrence relation&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;b&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1076em&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Assume&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.5782em;vertical-align:-0.0391em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7335em;vertical-align:-0.0391em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;b&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1076em&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0991em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8491em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; where &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.8304em;vertical-align:-0.136em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;≥&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h4&gt;Case 1 &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;For example &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Then &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0991em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8491em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;mbin mtight&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;also can be thought of as &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;∗&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1076em&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;))&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h4&gt;Case 2 &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.5782em;vertical-align:-0.0391em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;For example &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Then &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0991em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8491em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;∗&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.6644em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h4&gt;Case 3 &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.5782em;vertical-align:-0.0391em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;If you’re decreasing by more than 1, for example &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Then &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0991em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8491em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;∗&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0971em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8471em&quot;&gt;&lt;span style=&quot;top:-3.363em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mopen nulldelimiter sizing reset-size3 size6&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.6915em&quot;&gt;&lt;span style=&quot;top:-2.656em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size3 size1 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;b&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.2255em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line mtight&quot; style=&quot;border-bottom-width:0.049em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.384em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size3 size1 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.344em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter sizing reset-size3 size6&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;What if &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.5782em;vertical-align:-0.0391em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; for example .5&lt;/p&gt;
&lt;p&gt;Then &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0991em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8491em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; or &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1076em&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;))&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Books Read in 2022</title><link>https://briansunter.com/books-read-in-2022</link><guid isPermaLink="true">https://briansunter.com/books-read-in-2022</guid><description>List of books I read in 2022 with short summaries</description><pubDate>Sun, 01 Jan 2023 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/books-read-site_1672793412235_0.DVl9kmjp_1wOrpH.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;2022 was a good year for reading!&lt;/p&gt;
&lt;p&gt;I collected my thoughts on the books I read and some excerpts that gave a feel for the book, so you can gauge if it’s something you’d be interested in, along with Amazon (affiliate) links.&lt;/p&gt;
&lt;p&gt;Out of these, some of my favorites were “&lt;strong&gt;Hard-Boiled Wonderland and the End of the World by Haruki Murakami&lt;/strong&gt;”, “&lt;strong&gt;Mistborn by Brandon Sanderson&lt;/strong&gt;”, “&lt;strong&gt;The Picture of Dorian Gray by Oscar Wilde&lt;/strong&gt;”, and “&lt;strong&gt;The Gay Science by Friedrich Nietzsche&lt;/strong&gt;”.&lt;/p&gt;
&lt;h3&gt;Building a Second Brain by Tiago Forte&lt;/h3&gt;
&lt;figure&gt;&lt;img alt=&quot;basb&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 394px) 394px, 100vw&quot; width=&quot;394&quot; height=&quot;598&quot; src=&quot;https://briansunter.com/_astro/basb_1672455079106_0.TSPs7pBV_DLHeV.webp&quot; srcset=&quot;https://briansunter.com/_astro/basb_1672455079106_0.TSPs7pBV_DLHeV.webp 394w&quot; /&gt;&lt;figcaption&gt;basb&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;a href=&quot;https://www.amazon.com/dp/1982167386?tag=bsunter06-20&quot;&gt;Amazon Link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Tiago Forte’s Building a Second Brain book is a guide to developing a productivity system that helps you better manage information and improve your creativity, productivity, and ability to generate insights.&lt;/p&gt;
&lt;p&gt;I incorporated many ideas from his book into my system, like focusing on projects, organizing by project and life areas, his summarization tips, and project checklist ideas.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Your job as a notetaker is to preserve the notes you’re taking on the things you discover in such a way that they can survive the journey into the future. That way your excitement and enthusiasm for your knowledge builds over time instead of fading away&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;What’s the point of knowing something if it doesn’t positively impact anyone, not even yourself?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;building-a-second-brain|Read my full summary here&lt;/p&gt;
&lt;h3&gt;The Untethered Soul by Michael Singer&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://www.amazon.com/dp/1572245379?tag=bsunter06-20&quot;&gt;Amazon Link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A guide to getting in touch with your inner self. How to watch your thoughts like a TV show instead of being a character in the show. “You are not your thoughts or emotions. You are the one experiencing them.”&lt;/p&gt;
&lt;p&gt;I thought it was a good introduction to mindfulness. I liked the concept of “The Inner Roommate.” Who is always dissatisfied and arguing against you, a form of anxious energy manifested as a voice in your head.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;“There is nothing more important to true growth than realizing that you are not the voice of the mind - you are the one who hears it.”&lt;/p&gt;
&lt;/blockquote&gt;


&lt;blockquote&gt;
&lt;p&gt;In case you haven’t noticed, you have a mental dialogue going on inside your head that never stops. It just keeps going and going. Have you ever wondered why it talks in there? How does it decide what to say and when to say it? How much of what it says turns out to be true? How much of what it says is even important? And if right now you are hearing, “I don’t know what you’re talking about. I don’t have any voice inside my head!”—that’s the voice we’re talking about.&lt;/p&gt;
&lt;/blockquote&gt;


&lt;blockquote&gt;
&lt;p&gt;While you’re driving, you hear internal conversations like, “Wasn’t I supposed to call Fred? I should have. Oh my God, I can’t believe I forgot! He’s going to be so mad. He may never talk to me again. Maybe I should stop and call him right now. No. I don’t want to stop the car right now…”
Notice that the voice takes both sides of the conversation. It doesn’t care which side it takes, just as long as it gets to keep on talking.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Simple Path to Wealth by J.L Collins&lt;/h3&gt;
&lt;figure&gt;&lt;img alt=&quot;31QRvVZpizL. AC SY780&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 303px) 303px, 100vw&quot; width=&quot;303&quot; height=&quot;500&quot; src=&quot;https://briansunter.com/_astro/31QRvVZpizL._AC_SY780_1672620409758_0.DqdqwE7G_ZIsmbY.webp&quot; srcset=&quot;https://briansunter.com/_astro/31QRvVZpizL._AC_SY780_1672620409758_0.DqdqwE7G_ZIsmbY.webp 303w&quot; /&gt;&lt;figcaption&gt;31QRvVZpizL. AC SY780&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;a href=&quot;https://www.amazon.com/dp/B0725RFDPY?tag=bsunter06-20&quot;&gt;Amazon Link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Great book for those interested in managing money and financial independence. It discourages you from trying to beat the market and suggests you invest in index funds and get rich slowly.&lt;/p&gt;
&lt;p&gt;This book helped me develop a plan for my finances and feel good about my strategy, despite the world’s uncertainty.&lt;/p&gt;


&lt;blockquote&gt;
&lt;p&gt;“Spend less than you earn—invest the surplus—avoid debt.”&lt;/p&gt;
&lt;/blockquote&gt;


&lt;blockquote&gt;
&lt;p&gt;If your lifestyle matches—or god forbid exceeds—your income, you are no more than a gilded slave.&lt;/p&gt;
&lt;/blockquote&gt;


&lt;blockquote&gt;
&lt;p&gt;Avoid investment advisors. Too many have only their own interests at heart. By the time you know enough to pick a good one, you know enough to handle your finances yourself. It’s your money and no one will care for it better than you.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Money can buy many things, but nothing more valuable than your freedom.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Life choices are not always about the money, but you should always be clear about the financial impact of the choices you make.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Sound investing is not complicated.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;The stock market is a powerful wealth-building tool and you should be investing in it. But realize the market and the value of your shares will sometimes drop dramatically. This is absolutely normal and to be expected. When it happens, ignore the drops and buy more shares.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;This will be much, much harder than you think. People all around you will panic. The news media will be screaming Sell, Sell, Sell!&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;When you can live on 4% of your investments per year, you are financially independent.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Hold Me Tight by Dr. Sue Johnson&lt;/h3&gt;
&lt;figure&gt;&lt;img alt=&quot;hold-me-tight&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 323px) 323px, 100vw&quot; width=&quot;323&quot; height=&quot;500&quot; src=&quot;https://briansunter.com/_astro/hold-me-tight_1672771838590_0.Cv0PY_dW_Z2p0h52.webp&quot; srcset=&quot;https://briansunter.com/_astro/hold-me-tight_1672771838590_0.Cv0PY_dW_Z2p0h52.webp 323w&quot; /&gt;&lt;figcaption&gt;hold-me-tight&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;a href=&quot;https://www.amazon.com/dp/1491513810?tag=bsunter06-20&quot;&gt;Amazon Link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Hold me tight is a relationship book that helps you communicate better and form a deeper connection with your romantic partner.&lt;/p&gt;
&lt;p&gt;One of my goals last year was to improve communication with my partner and be more intentional in my relationship, and this book contained a lot of helpful, actionable advice.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;When marriages fail, it is not increasing conflict that is the cause. It is decreasing affection and emotional responsiveness, according to a landmark study by Ted Huston of the University of Texas. Indeed, the lack of emotional responsiveness rather than the level of conflict is the best predictor of how solid a marriage will be five years into it. The demise of marriages begins with a growing absence of responsive intimate interactions. The conflict comes later.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Emotional responsiveness has three main components:&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Accessibility: Can I reach you? This means staying open to your partner even when you have doubts and feel insecure. It often means being willing to struggle to make sense of your emotions so these emotions are not so overwhelming. You can then step back from disconnection and can tune in to your lover’s attachment cues.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Responsiveness: Can I rely on you to respond to me emotionally? This means tuning in to your partner and showing that his or her emotions, especially attachment needs and fears, have an impact on you. It means accepting and placing a priority on the emotional signals your partner conveys and sending clear signals of comfort and caring when your partner needs them.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Engagement: Do I know you will value me and stay close? The dictionary defines &lt;em&gt;engaged&lt;/em&gt; as being absorbed, attracted, pulled, captivated, pledged, involved. Emotional engagement here means the very special kind of attention that we give only to a loved one. We gaze at them longer, touch them more. Partners often talk of this as being emotionally present.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Authority and the Individual by Bertrand Russel&lt;/h3&gt;
&lt;figure&gt;&lt;img alt=&quot;418Mwg6YAqL&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 325px) 325px, 100vw&quot; width=&quot;325&quot; height=&quot;500&quot; src=&quot;https://briansunter.com/_astro/418Mwg6YAqL_1672620426734_0.HT5zwCt-_1xUuQo.webp&quot; srcset=&quot;https://briansunter.com/_astro/418Mwg6YAqL_1672620426734_0.HT5zwCt-_1xUuQo.webp 325w&quot; /&gt;&lt;figcaption&gt;418Mwg6YAqL&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;a href=&quot;https://www.amazon.com/dp/0415487331?tag=bsunter06-20&quot;&gt;Amazon Links&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;How can we combine that degree of individual initiative necessary for progress with the social cohesion necessary for survival? He advocates empowered individuals to make change within their immediate circle.&lt;/p&gt;
&lt;p&gt;A nuanced take on one of my favorite topics: the tension between the individual and society.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;In all social animals, including Man, co-operation and the unity of a group has some foundation in instinct. This is most complete in ants and bees, which apparently are never tempted to anti-social actions and never deviate from devotion to the nest or the hive. Up to a point we may admire this unswerving devotion to public duty, but it has its drawbacks; ants and bees do not produce great works of art, or make scientific discoveries, or found religions teaching that all ants are sisters. Their social life, in fact, is mechanical, precise and static. We are willing that human life shall have an element of turbulence if thereby we can escape such evolutionary stagnation.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;The sphere of individual action is not to be regarded as ethically inferior to that of social duty. On the contrary, some of the best of human activities are, at least in feeling, rather personal than social. Prophets, mystics, poets, scientific discoverers, are men whose lives are dominated by a vision; they are essentially solitary men. When their dominant impulse is strong, they feel that they cannot obey authority if it runs counter to what they profoundly believe to be good. Although, on this account, they are often persecuted in their own day, they are apt to be, of all men, those to whom posterity pays the highest honour. It is such men who put into the world the things that we most value, not only in religion, in art, and in science, but also in our way of feeling towards our neighbour, for improvements in the sense of social obligation, as in everything else, have been largely due to solitary men whose thoughts and emotions were not subject to the dominion of the herd.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;The Screwtape Letters by C.S. Lewis&lt;/h3&gt;
&lt;figure&gt;&lt;img alt=&quot;screwtape&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 332px) 332px, 100vw&quot; width=&quot;332&quot; height=&quot;500&quot; src=&quot;https://briansunter.com/_astro/screwtape_1672620785526_0.D3DxHk6H_Z10owsl.webp&quot; srcset=&quot;https://briansunter.com/_astro/screwtape_1672620785526_0.D3DxHk6H_Z10owsl.webp 332w&quot; /&gt;&lt;figcaption&gt;screwtape&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;a href=&quot;https://www.amazon.com/dp/0060652934?tag=bsunter06-20&quot;&gt;Amazon Link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A religious satire defending Christianity in the form of imagined letters between a demon and his demon uncle on how best to corrupt humanity. Each demon is assigned a human for them to corrupt; it’s a fun exploration of a usually stuffy topic.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Nearly all vices are rooted in the future. Gratitude looks to the past and love to the present; fear, avarice, lust and ambition look ahead.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;The Gay Science by Friedrich Nietzsche&lt;/h3&gt;
&lt;figure&gt;&lt;img alt=&quot;gay-science&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 502px) 502px, 100vw&quot; width=&quot;502&quot; height=&quot;858&quot; src=&quot;https://briansunter.com/_astro/gay-science_1672621370939_0.DpSxtDfx_ZSib2a.webp&quot; srcset=&quot;https://briansunter.com/_astro/gay-science_1672621370939_0.DpSxtDfx_ZSib2a.webp 502w&quot; /&gt;&lt;figcaption&gt;gay-science&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;a href=&quot;https://www.amazon.com/dp/B003E8AJEM?tag=bsunter06-20&quot;&gt;Amazon Link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Also translated as “The Joyous Wisdom.” Aphoristic musings on a wide range of topics such as morality, religion, psychology, art, and science. Unlike most boring, dry philosophy texts, it is written in an energetic, poetic, rhapsodic style. It’s not for everyone. Controversial and guaranteed to provoke a reaction.&lt;/p&gt;
&lt;p&gt;The book doesn’t propose a philosophical system but is more a series of questions and observations in the form of short aphorisms meant to provoke thought in the reader. I really liked this style of philosophy book written in an invigorating, playful style.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;For the new year&lt;/em&gt;.— I still live, I still think: I still have to live, for I still have to think. &lt;em&gt;Sum, ergo cogito: cogito, ergo sum&lt;/em&gt;. Today everybody permits himself the expression of his wish and his dearest thought; hence I, too, shall say what it is that I wish from myself today, and what was the first thought to run across my heart this year—what thought shall be for me the reason, warranty, and sweetness of my life henceforth. I want to learn more and more to see as beautiful what is necessary in things; then I shall be one of those who make things beautiful. Amor fati: let that be my love henceforth! I do not want to wage war against what is ugly. I do not want to accuse; I do not even want to accuse those who accuse. &lt;em&gt;Looking away&lt;/em&gt; shall be my only negation. And all in all and on the whole: some day I wish to be only a Yes-sayer.&lt;/p&gt;
&lt;/blockquote&gt;


&lt;blockquote&gt;
&lt;p&gt;To the teachers of selfishness.— A man’s virtues are called good depending on their probable consequences not for him but for us and society: the praise of virtues has always been far from “selfless,” far from “unegoistic.”&lt;/p&gt;
&lt;/blockquote&gt;


&lt;blockquote&gt;
&lt;p&gt;Preludes of science.— Do you really believe that the sciences would ever have originated and grown if the way had not been prepared by magicians, alchemists, astrologers, and witches whose promises and pretensions first had to create a thirst, a hunger, a taste for hidden and forbidden powers? Indeed, infinitely more had to be promised than could ever be fulfilled in order that anything at all might be fulfilled in the realm of knowledge”&lt;/p&gt;
&lt;/blockquote&gt;


&lt;blockquote&gt;
&lt;p&gt;Against remorse.— A thinker sees his own actions as experiments and questions—as attempts to find out something. Success and failure are for him answers above all. To be annoyed or feel remorse because something goes wrong—that he leaves to those who act because they have received orders and who have to reckon with a beating when his lordship is not satisfied with the result.”&lt;/p&gt;
&lt;/blockquote&gt;


&lt;blockquote&gt;
&lt;p&gt;Excelsior.— “You will never pray again, never adore again, never again rest in endless trust; you do not permit yourself to stop before any ultimate wisdom, ultimate goodness, ultimate power, while unharnessing your thoughts; you have no perpetual guardian and friend for your seven solitudes; there is no avenger for you any more nor any final improver; there is no longer any reason in what happens, no love in what will happen to you; no resting place is open any longer to your heart.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;Almanack of Naval Ravikant by Eric Jorgenson&lt;/h3&gt;
&lt;figure&gt;&lt;img alt=&quot;41ZZY5kzLL&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 500px) 500px, 100vw&quot; width=&quot;500&quot; height=&quot;500&quot; src=&quot;https://briansunter.com/_astro/41ZZY5kzLL_1670306664477_0.CQVdeDHf_1GHhgY.webp&quot; srcset=&quot;https://briansunter.com/_astro/41ZZY5kzLL_1670306664477_0.CQVdeDHf_1GHhgY.webp 500w&quot; /&gt;&lt;figcaption&gt;41ZZY5kzLL&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;a href=&quot;https://www.navalmanack.com/&quot;&gt;Free Book Link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Collection of tweets by naval on entrepreneurship, happiness, and health. Lots of great assorted wisdom. My favorite topics are “Specific Knowledge” and “How to get rich without getting lucky.” It inspired me to be more authentic and follow my passions.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Specific knowledge is knowledge you cannot be trained for. If society can train you, it can train someone else and replace you.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Specific knowledge is found much more by pursuing your innate talents, your genuine curiosity, and your passion. It’s not by going to school for whatever is the hottest job; it’s not by going into whatever field investors say is the hottest.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Wealth is the thing you want. Wealth is assets that earn while you sleep. Wealth is the factory, the robots, cranking out things. Wealth is the computer program that’s running at night, serving other customers. Wealth is even money in the bank that is being reinvested into other assets, and into other businesses.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;See my almanack-of-naval-ravikant|full notes on the book here&lt;/p&gt;
&lt;h3&gt;Man’s Search for Meaning Viktor E. Frankl&lt;/h3&gt;
&lt;figure&gt;&lt;img alt=&quot;mans-meaning&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 324px) 324px, 100vw&quot; width=&quot;324&quot; height=&quot;500&quot; src=&quot;https://briansunter.com/_astro/mans-meaning_1672626609393_0.CZioKjBy_Z1hYQpt.webp&quot; srcset=&quot;https://briansunter.com/_astro/mans-meaning_1672626609393_0.CZioKjBy_Z1hYQpt.webp 324w&quot; /&gt;&lt;figcaption&gt;mans-meaning&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;a href=&quot;https://www.amazon.com/dp/B009U9S6FI?tag=bsunter06-20&quot;&gt;Amazon Link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;How can we find cope with suffering and find meaning?&lt;/p&gt;
&lt;p&gt;The first half is about his experiences in a concentration camp, and the second half is about his philosophy of “logotherapy.” Heart-wrenching and thought-provoking. Inspiring how someone can go through such a horrific experience and still be positive and optimistic about the world.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Everything can be taken from a man but one thing: the last of the human freedoms—to choose one’s attitude in any given set of circumstances, to choose one’s own way.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;Apology by Plato/Socrates&lt;/h3&gt;
&lt;figure&gt;&lt;img alt=&quot;socrates&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 763px) 763px, 100vw&quot; width=&quot;763&quot; height=&quot;1172&quot; src=&quot;https://briansunter.com/_astro/socrates_1672728321436_0.CUng3r-k_1KemqW.webp&quot; srcset=&quot;https://briansunter.com/_astro/socrates_1672728321436_0.CUng3r-k_Z1ylwU8.webp 640w, https://briansunter.com/_astro/socrates_1672728321436_0.CUng3r-k_1wFFCm.webp 750w, https://briansunter.com/_astro/socrates_1672728321436_0.CUng3r-k_1KemqW.webp 763w&quot; /&gt;&lt;figcaption&gt;socrates&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;a href=&quot;https://www.amazon.com/Last-Days-Socrates-Penguin-Classics/dp/0140449280&quot;&gt;Amazon Link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;An account of Socrates’ speech defending himself at the trial, where he was condemned to death for corrupting the youth of Athens. One of the most critical moments in history that we’re still talking about thousands of years later.&lt;/p&gt;
&lt;p&gt;An excellent example of greek rhetoric. I highly recommend reading a commentary &lt;a href=&quot;https://www.friesian.com/apology.htm&quot;&gt;such as this one&lt;/a&gt; to fully appreciate what he’s doing and get the full context.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;He asked the oracle to tell him whether there was anyone wiser than I was, and the Pythian prophetess answered that there was no man wiser&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;When I heard the answer, I said to myself, What can the god mean? and what is the interpretation of this riddle? for I know that I have no wisdom, small or great. What can he mean when he says that I am the wisest of men?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;I reflected that if I could only find a man wiser than myself, then I might go to the god with a refutation in my hand. I should say to him, “Here is a man who is wiser than I am; but you said that I was the wisest.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;I went to one who had the reputation of wisdom, and observed to him and the result was as follows: When I began to talk with him, I could not help thinking that he was not really wise, although he was thought wise by many, and wiser still by himself.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;I went and tried to explain to him that he thought himself wise, but was not really wise; and the consequence was that he hated me&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;I left him, saying to myself, as I went away: Well, although I do not suppose that either of us knows anything really beautiful and good, I am better off than he is - for he knows nothing, and thinks that he knows. I neither know nor think that I know. In this latter particular, then, I seem to have slightly the advantage of him.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;I found that the men most in repute were all but the most foolish; and that some inferior men were really wiser and better.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;The Gateless Gate by Wumen Huikai&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://www.amazon.com/dp/0861713826?tag=bsunter06-20&quot;&gt;Amazon Link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A collection of koans by Chinese Zen master Wumen Huikai, who lived around 1200 A.D.&lt;/p&gt;
&lt;p&gt;Wumen was an eccentric Zen master who traveled from temple to temple. The questing philosopher myth, where students traveled to masters of various temples with a “burning question” to achieve enlightenment, is one of my favorite themes in Chinese history, and Wumen is a classic example.&lt;/p&gt;
&lt;p&gt;A koan is a short paradoxical statement meant to help students attain intuitive enlightment.&lt;/p&gt;
&lt;p&gt;I found these extremely interesting. However, I can’t pretend to really understand the meaning of any of them. I’ll need to revisit these with a commentary. Still, they were very thought-provoking and surprising.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;A monk told Joshu: “I have just entered the monastery. Please teach me.”
Joshu asked: “Have you eaten your rice porridge?”
The monk replied: “I have eaten.”
Joshu said: “Then you had better wash your bowl.”
At that moment the monk was enlightened.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;It is too clear and so it is hard to see.
A dunce once searched for a fire with a lighted lantern.
Had he known what fire was
He could have cooked his rice much sooner.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Gutei raised his finger whenever he was asked a question about Zen. A boy attendant began to imitate him in this way. When anyone asked the boy what his master had preached about, the boy would raise his finger.
Gutei heard about the boy’s mischief. He seized him and cut off his finger. The boy cried and ran away. Gutei called and stopped him. When the boy turned his head to Gutei, Gutei raised up his own finger. In that instant the boy was enlightened.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Typescript Handbook&lt;/h3&gt;
&lt;figure&gt;&lt;img alt=&quot;typescript-handbook&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 318px) 318px, 100vw&quot; width=&quot;318&quot; height=&quot;443&quot; src=&quot;https://briansunter.com/_astro/typescript-handbook_1672627324910_0.BVaqF1eM_Z1oMXhJ.webp&quot; srcset=&quot;https://briansunter.com/_astro/typescript-handbook_1672627324910_0.BVaqF1eM_Z1oMXhJ.webp 318w&quot; /&gt;&lt;figcaption&gt;typescript-handbook&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;a href=&quot;https://www.typescriptlang.org/docs/handbook/intro.html&quot;&gt;Free Book Link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It should be required reading for everyone using typescript.&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;typescript&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;// Type Predicates&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; isFish&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;pet&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; Fish&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; |&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; Bird&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt; pet&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; is&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; Fish&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;  return&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (pet &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;as&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; Fish&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;).swim &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;!==&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; undefined&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;let&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; pet &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; getSmallPet&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;isFish&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(pet)) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  pet.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;swim&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;} &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;else&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  pet.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;fly&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3&gt;Let’s Explore Diabetes with Owls by David Sedaris&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://www.amazon.com/dp/0316154709?tag=bsunter06-20&quot;&gt;Amazon Link&lt;/a&gt;&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;diabetes&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 300px) 300px, 100vw&quot; width=&quot;300&quot; height=&quot;400&quot; src=&quot;https://briansunter.com/_astro/diabetes_1672627569188_0.BLJuddOa_ZGxyUr.webp&quot; srcset=&quot;https://briansunter.com/_astro/diabetes_1672627569188_0.BLJuddOa_ZGxyUr.webp 300w&quot; /&gt;&lt;figcaption&gt;diabetes&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Hilarious neurotic bizarre, yet relatable essays by David Sedaris. The anecdotes come from observations from his personal life and the funny situations he gets in. Topics range from living in France taxidermy owls, and colonoscopies.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The thing about Hawaii, at least the part that is geared toward tourists, is that it’s exactly what it promises to be. Step off the plane, and someone places a lei around your neck, as if it were something you had earned—an Olympic medal for sitting on your ass. Raise a hand above your shoulder and, no matter where you are, a drink will appear: something served in a hollowed-out pineapple, or perhaps in a coconut that’s been sawed in half. &lt;em&gt;Just like in the time before glasses!&lt;/em&gt; you think.&lt;/p&gt;
&lt;/blockquote&gt;


&lt;blockquote&gt;
&lt;p&gt;Volcanic craters, waterfalls, and those immaculate beaches—shocking things when you’re coming from Europe. At the spot Hugh and I go to in Normandy you’ll find, in place of sand, speckled stones the size of potatoes. The water runs from glacial to heart attack and is tinted the color of iced tea.&lt;/p&gt;
&lt;/blockquote&gt;


&lt;blockquote&gt;
&lt;p&gt;The beaches in Hawaii look as if they’ve been bleached; that’s how white the sand is. The water is warm—even in winter—and so clear you can see not just your toes but the corns cleaving, barnacle-like, to the sides of them.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;Hard-Boiled Wonderland and the End of the World by Haruki Murakami&lt;/h3&gt;
&lt;figure&gt;&lt;img alt=&quot;hardboiled&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 518px) 518px, 100vw&quot; width=&quot;518&quot; height=&quot;800&quot; src=&quot;https://briansunter.com/_astro/hardboiled_1672628001084_0.Dv3v_tuX_Z1ABJOX.webp&quot; srcset=&quot;https://briansunter.com/_astro/hardboiled_1672628001084_0.Dv3v_tuX_Z1ABJOX.webp 518w&quot; /&gt;&lt;figcaption&gt;hardboiled&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;a href=&quot;https://www.amazon.com/dp/0679743464?tag=bsunter06-20&quot;&gt;Amazon Link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The protagonist is a human data processor trained to encrypt data with his mind to protect it from criminal groups.&lt;/p&gt;
&lt;p&gt;It has two intertwined stories where he helps a mysterious scientist with a project in dystopian Tokyo and explores a strange isolated town surrounded by an impenetrable wall.&lt;/p&gt;
&lt;p&gt;A dreamy, creative “detective” book with magical realism. I don’t usually like magical realism, and I struggled with some other Murakami books because of this, but this was very approachable. My favorite part is The Town, which is so mysterious and fascinating.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Semiotecs traffic illegally obtained data and other information on the black market, making megaprofits. And what’s worse, they keep the most valuable bits of information for themselves and the benefit of their own organization.
Our organization is generally called the System, theirs the Factory. The System was originally a private conglomerate, but as it grew in importance it took on quasi-governmental status. In the same way as, say, Ma Bell in America. We rank-and-file Calcutecs work as individual independents not unlike tax accountants or attorneys, yet we need licenses from the state and can only take on jobs from the System or through one of the official agents designated by the System. This arrangement is intended to prevent misuse of technologies by the Factory. Any violation thereof, and they revoke your license. I can’t really say whether these preventative measures make sense or not. The reason being that any Calcutec stripped of his qualifications eventually ends up getting absorbed into the Factory and going underground to become a Semiotec.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;The skull is unnaturally light, with virtually no material presence. Nor does it offer any image of the species that had breathed within. It is stripped of flesh, warmth, memory. In the middle of the forehead is a small depression, rough to the touch. Perhaps this is the vestige of a broken horn.
“Is this a skull of one of the Town unicorns?” I ask her.
“Yes. The old dream is sealed inside.”
“I am to read an old dream from this?”
“That is the work of the Dreamreader,” says the Librarian.
“And what do I do with the dreams I read?”
“Nothing. You have only to read them.”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;“Excuse me for asking so many questions,” I say. “I know nothing about this Town. How it works, why it needs the Wall, why the beasts are herded in and out every day. I do not understand any of it. You are the only one I can ask.”
“Not even I know all the rules,” says the old officer under his breath. “There are things that cannot and should not be explained. But there is no cause for concern. The Town is fair in its own way. The things you need, the things you need to know, one by one the Town will set these before you. Hear me now: this Town is perfect. And by perfect, I mean complete. It has everything. If you cannot see that, then it has nothing. A perfect nothing. Remember this well. That is as much as anyone can tell you; the rest you must learn for yourself. Open your eyes, train your ears, use your head. If a mind you have, then use it while you can.”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;The Picture of Dorian Gray by Oscar Wilde&lt;/h3&gt;
&lt;figure&gt;&lt;img alt=&quot;dorian&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 313px) 313px, 100vw&quot; width=&quot;313&quot; height=&quot;500&quot; src=&quot;https://briansunter.com/_astro/dorian_1672628846521_0.CLODanYG_Z1cpKPj.webp&quot; srcset=&quot;https://briansunter.com/_astro/dorian_1672628846521_0.CLODanYG_Z1cpKPj.webp 313w&quot; /&gt;&lt;figcaption&gt;dorian&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;a href=&quot;https://www.amazon.com/dp/1515190994?tag=bsunter06-20&quot;&gt;Amazon Link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The beautiful Dorian Gray makes an impulsive wish to stay young while his portrait remains the same, aging over time to absorb the damage of his wild life.&lt;/p&gt;
&lt;p&gt;Genius writing and dialog that’s playful and intellectual. It explores the purpose of art and our obsession with youth and beauty. I loved the Lord Henry character.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I know you will laugh at me,” he replied, “but I really can’t exhibit it. I have put too much of myself into it.” Too much of yourself in it! Upon my word, Basil, I didn’t know you were so vain; and I really can’t see any resemblance between you, with your rugged strong face, and your coal-black hair, and this young Adonis, who looks as if he was made of ivory and rose-leaves.
Why, my dear Basil, he is a Narcissus, and you—well, of course you have an intellectual expression, and all that. But Beauty, real Beauty, ends where an intellectual expression begins. Intellect is in itself an exaggeration, and destroys the harmony of any face. The moment one sits down to think, one becomes all nose, or all forehead, or something horrid. Look at the successful men in any of the learned professions. How perfectly hideous they are!&lt;/p&gt;
&lt;/blockquote&gt;


&lt;blockquote&gt;
&lt;p&gt;The one charm of marriage is that it makes a life of deception necessary for both parties. I never know where my wife is, and my wife never knows what I am doing. When we meet—we do meet occasionally, when we dine out together, or go down to the Duke’s—we tell each other the most absurd stories with the most serious faces. My wife is very good at it—much better in fact than I am. She never gets confused over her dates, and I always do. But when she does find me out, she makes no row at all. I sometimes wish she did, but she merely laughs at me.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;blockquote&gt;
&lt;p&gt;Beauty is a form of Genius—is higher, indeed, than Genius, as it needs no explanation. It is one of the great facts of the world, like sunlight, or springtime, or the reflection in the dark waters of that silver shell we call the moon. It cannot be questioned. It has divine right of sovereignty. It makes princes of those who have it.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Where the Crawdads Sing by Delia Owens&lt;/h3&gt;
&lt;figure&gt;&lt;img alt=&quot;crawdads&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 332px) 332px, 100vw&quot; width=&quot;332&quot; height=&quot;500&quot; src=&quot;https://briansunter.com/_astro/crawdads_1672629636504_0.2Vdoighw_Z2cPRR8.webp&quot; srcset=&quot;https://briansunter.com/_astro/crawdads_1672629636504_0.2Vdoighw_Z2cPRR8.webp 332w&quot; /&gt;&lt;figcaption&gt;crawdads&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;a href=&quot;https://www.amazon.com/dp/0735219095?tag=bsunter06-20&quot;&gt;Amazon Link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A murder mystery in a small town in the marshes of North Carolina. Follows Kya’s life growing up in the swamp, her passion for the natural world, how the town shuns her, and her accusation of murder.&lt;/p&gt;
&lt;p&gt;This was a nice easy read, and I liked the imagery of the marshy small town in North Carolina. The characters were good and the plot held my attention throughout the book.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The morning burned so August-hot, the marsh’s moist breath hung the oaks and pines with fog. The palmetto patches stood unusually quiet except for the low, slow flap of the heron’s wings lifting from the lagoon. And then, Kya, only six at the time, heard the screen door slap. Standing on the stool, she stopped scrubbing grits from the pot and lowered it into the basin of worn-out suds. No sounds now but her own breathing. Who had left the shack? Not Ma. She never let the door slam.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;She knew the years of isolation had altered her behavior until she was different from others, but it wasn’t her fault she’d been alone. Most of what she knew, she’d learned from the wild. Nature had nurtured, tutored, and protected her when no one else would.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Dune by Frank Herbert&lt;/h3&gt;
&lt;figure&gt;&lt;img alt=&quot;dune&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 279px) 279px, 100vw&quot; width=&quot;279&quot; height=&quot;500&quot; src=&quot;https://briansunter.com/_astro/dune_1672629693314_0.Bu1GYbTG_1tF7yd.webp&quot; srcset=&quot;https://briansunter.com/_astro/dune_1672629693314_0.Bu1GYbTG_1tF7yd.webp 279w&quot; /&gt;&lt;figcaption&gt;dune&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;A science fiction space opera centered around the desert planet of Arrakis, which has spice, the most valuable resource in the universe because it gives those that use it the power to navigate open space.&lt;/p&gt;
&lt;p&gt;I liked it, but I didn’t love it. The worldbuilding is excellent, but the characters and plot were a bit flat to me.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I must not fear. Fear is the mind-killer. Fear is the little-death that brings total obliteration. I will face my fear. I will permit it to pass over me and through me. And when it has gone past I will turn the inner eye to see its path. Where the fear has gone there will be nothing. Only I will remain.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Here’s a new one for you: the gom jabbar. It kills only animals.’
Pride overcame Paul’s fear. ‘You dare suggest a duke’s son is an animal?’ he demanded.
‘Let us say I suggest you may be human,’ she said. ‘Steady! I warn you not to try jerking away. I am old, but my hand can drive this needle into your neck before you escape me.’
‘Who are you?’ he whispered. ‘How did you trick my mother into leaving me alone with you? Are you from the Harkonnens?’
‘The Harkonnens? Bless us, no! Now, be silent.’ A dry finger touched his neck and he stilled the involuntary urge to leap away.
‘Good,’ she said. ‘You pass the first test. Now, here’s the way of the rest of it: If you withdraw your hand from the box you die. This is the only rule. Keep your hand in the box and live. Withdraw it and die.’&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Those storms build up across six or seven thousand kilometers of flatlands, feed on anything that can give them a push – coriolis force, other storms, anything that has an ounce of energy in it. They can blow up to seven hundred kilometers an hour, loaded with everything loose that’s in their way – sand, dust, everything. They can eat flesh off bones and etch the bones to slivers.’&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;‘Have you ever seen the Fremen?’
‘Like as not I have seen them,’ he said. ‘There’s little to tell them from the folk of the graben and sink. They all wear those great flowing robes. And they stink to heaven in any closed space. It’s from those suits they wear – call them “stillsuits” – that reclaim the body’s own water.’
Paul swallowed, suddenly aware of the moisture in his mouth, remembering a dream of thirst. That people could want so for water they had to recycle their body moisture struck him with a feeling of desolation. ‘Water’s precious there,’ he said.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Master and Margarita by Mikhail Bulgakov&lt;/h3&gt;
&lt;figure&gt;&lt;img alt=&quot;master-margarita&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 300px) 300px, 100vw&quot; width=&quot;300&quot; height=&quot;450&quot; src=&quot;https://briansunter.com/_astro/master-margarita_1672629817618_0.CD28ee-D_Z2Hgjp.webp&quot; srcset=&quot;https://briansunter.com/_astro/master-margarita_1672629817618_0.CD28ee-D_Z2Hgjp.webp 300w&quot; /&gt;&lt;figcaption&gt;master-margarita&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;a href=&quot;https://www.amazon.com/dp/0141180145?tag=bsunter06-20&quot;&gt;Amazon Link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A story about the devil going to soviet Moscow intertwined with the story of Pontius Pilate deliberating over how to handle Jesus. Captures the paranoid nature of soviet era life with a huge dose of magical realism involving talking cats and flying vampires.&lt;/p&gt;
&lt;p&gt;The book was a little too magical realist for me, and the plot was extremely convoluted, but there were some amazing scenes, it was extremely creative, and the style was excellent.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;‘Yes, man is mortal, but that would be only half the trouble. The worst of it is that he’s sometimes unexpectedly mortal — there’s the trick!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;blockquote&gt;
&lt;p&gt;May I sit down?’ the foreigner asked politely, and the friends somehow involuntarily moved apart; the foreigner adroitly sat down between them and at once entered into the conversation:
‘Unless I heard wrong, you were pleased to say that Jesus never existed?’ the foreigner asked, turning his green left eye to Berlioz.
‘No, you did not hear wrong,’ Berlioz replied courteously, ‘that is precisely what I was saying.’
Ah, how interesting!’ exclaimed the foreigner.
‘What the devil does he want?’ thought Homeless, frowning.
‘And you were agreeing with your interlocutor?’ inquired the stranger, turning to Homeless on his right.
‘A hundred per cent!’ confirmed the man, who was fond of whimsical and figurative expressions.
‘Amazing!’ exclaimed the uninvited interlocutor and, casting a thievish glance around and muffling his low voice for some reason, he said: ‘Forgive my importunity, but, as I understand, along with everything else, you also do not believe in God?’ He made frightened eyes and added: ‘I swear I won’t tell anyone!’&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;‘Answer, then,’ he went on speaking, ‘do you know a certain Judas from Kiriath, and what precisely did you say to him about Caesar, if you said anything?’
‘It was like this,’ the prisoner began talking eagerly. ‘The evening before last, near the temple, I made the acquaintance of a young man who called himself Judas, from the town of Kiriath. He invited me to his place in the Lower City and treated me to …’
‘A good man?’ Pilate asked, and a devilish fire flashed in his eyes.
‘A very good man and an inquisitive one,’ the prisoner confirmed. ‘He showed the greatest interest in my thoughts and received me very cordially …’
‘Lit the lamps …’ Pilate spoke through his teeth, in the same tone as the prisoner, and his eyes glinted.
‘Yes,’ Yeshua went on, slightly surprised that the procurator was so well informed, ‘and asked me to give my view of state authority. He was extremely interested in this question.’
‘And what did you say?’ asked Pilate. ‘Or are you going to reply that you’ve forgotten what you said?’ But there was already hopelessness in Pilate’s tone.
‘Among other things,’ the prisoner recounted, ‘I said that all authority is violence over people, and that a time will come when there will be no authority of the Caesars, nor any other authority. Man will pass into the kingdom of truth and justice, where generally there will be no need for any authority.’
‘Go on!’
‘I didn’t go on,’ said the prisoner. ‘Here men ran in, bound me, and took me away to prison.’&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Travels with Charley by John Steinbeck&lt;/h3&gt;
&lt;figure&gt;&lt;img alt=&quot;travels-with-charley&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 326px) 326px, 100vw&quot; width=&quot;326&quot; height=&quot;500&quot; src=&quot;https://briansunter.com/_astro/travels-with-charley_1672052430785_0.BcJkxsS9_Z1zFzhd.webp&quot; srcset=&quot;https://briansunter.com/_astro/travels-with-charley_1672052430785_0.BcJkxsS9_Z1zFzhd.webp 326w&quot; /&gt;&lt;figcaption&gt;travels-with-charley&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;a href=&quot;https://www.amazon.com/dp/0140053204?tag=bsunter06-20&quot;&gt;Amazon Link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;John Steinbeck sets out on a road trip across 1960s America with his standard poodle, Charley, in search of “the character of the country.” He interviews different Americans on current social issues, such as the cold war and desegregation.&lt;/p&gt;
&lt;p&gt;This book does a great job of capturing the spirit of the American road trip and has the exceptional lyricism in plain English of all Steinbeck books.&lt;/p&gt;
&lt;p&gt;travels-with-charley|Read my full summary here&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I took one companion on my journey—an old French gentleman poodle known as Charley. Actually his name is Charles le Chien. He was born in Bercy on the outskirts of Paris and trained in France, and while he knows a little poodle-English, he responds quickly only to commands in French. Otherwise he has to translate, and that slows him down. He is a very big poodle, of a color called &lt;em&gt;bleu,&lt;/em&gt; and he is blue when he is clean. Charley is a born diplomat. He prefers negotiation to fighting, and properly so, since he is very bad at fighting. Only once in his ten years has he been in trouble—when he met a dog who refused to negotiate. Charley lost a piece of his right ear that time. But he is a good watch dog—has a roar like a lion, designed to conceal from night-wandering strangers the fact that he couldn’t bite his way out of a &lt;em&gt;cornet de pa-pier.&lt;/em&gt; He is a good friend and traveling companion, and would rather travel about than anything he can imagine. If he occurs at length in this account, it is because he contributed much to the trip. A dog, particularly an exotic like Charley, is a bond between strangers. Many conversations en route began with “What degree of a dog is that?”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;Neuromancer by William Gibson&lt;/h3&gt;
&lt;figure&gt;&lt;img alt=&quot;neuromancer&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 333px) 333px, 100vw&quot; width=&quot;333&quot; height=&quot;500&quot; src=&quot;https://briansunter.com/_astro/neuromancer_1672630101925_0.Cl5ac2Pz_Z2f9aeB.webp&quot; srcset=&quot;https://briansunter.com/_astro/neuromancer_1672630101925_0.Cl5ac2Pz_Z2f9aeB.webp 333w&quot; /&gt;&lt;figcaption&gt;neuromancer&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;a href=&quot;https://www.amazon.com/dp/B0058R83CW?tag=bsunter06-20&quot;&gt;Amazon Link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A cyberpunk novel about a destitute hacker hired by a powerful AI to execute a mysterious job in a dystopian world controlled by corporations and people augmented with cybernetic enhancements.&lt;/p&gt;
&lt;p&gt;I really enjoyed this book and was inspired to read it after playing the game Cyberpunk 2077, since this book inspired the cyberpunk genre, films like The Matrix, and cyberspace.&lt;/p&gt;
&lt;p&gt;I loved the central plotline of a rogue AI trying to escape and manipulate humans to do its bidding.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The black clinics of Chiba were the cutting edge, whole bodies of technique supplanted monthly, and still they couldn’t repair the damage he’d suffered in that Memphis hotel.
A year here and he still dreamed of cyberspace, hope fading nightly. All the speed he took, all the turns he’d taken and the corners he’d cut in Night City, and still he’d see the matrix in his sleep, bright lattices of logic unfolding across that colorless void… . The Sprawl was a long strange way home over the Pacific now, and he was no console man, no cyberspace cowboy. Just another hustler, trying to make it through. But the dreams came on in the Japanese night like livewire voodoo, and he’d cry for it, cry in his sleep, and wake alone in the dark, curled in his capsule in some coffin hotel, his hands clawed into the bedslab, temperfoam bunched between his fingers, trying to reach the console that wasn’t there.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Mistborn by Brandon Sanderson&lt;/h3&gt;
&lt;figure&gt;&lt;img alt=&quot;mistborn&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 310px) 310px, 100vw&quot; width=&quot;310&quot; height=&quot;500&quot; src=&quot;https://briansunter.com/_astro/mistborn_1672630557858_0.BYl5HZZX_Z8kC6w.webp&quot; srcset=&quot;https://briansunter.com/_astro/mistborn_1672630557858_0.BYl5HZZX_Z8kC6w.webp 310w&quot; /&gt;&lt;figcaption&gt;mistborn&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;a href=&quot;https://www.amazon.com/dp/B001QKBHG4?tag=bsunter06-20&quot;&gt;Amazon Link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Mistborne is a fantasy novel about a dystopian world where ashes constantly fall from the sky and the lower classes are enslaved by the immortal Lord Ruler and his aristocrats. A group uses a type of magic called allomancy, where you can draw magical powers from certain metals, to fight back.&lt;/p&gt;
&lt;p&gt;I loved this book. The characters, plot, pacing, and story arc were excellent. The dark dystopian fantasy world is exceptionally well done and has a unique magic system.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;ASH FELL FROM THE SKY.
Lord Tresting frowned, glancing up at the ruddy midday sky as his servants scuttled forward, opening a parasol over Tresting and his distinguished guest. Ashfalls weren’t that uncommon in the Final Empire, but Tresting had hoped to avoid getting soot stains on his fine new suit coat and red vest, which had just arrived via canal boat from Luthadel itself. Fortunately, there wasn’t much wind; the parasol would likely be effective.
Tresting stood with his guest on a small hilltop patio that overlooked the fields. Hundreds of people in brown smocks worked in the falling ash, caring for the crops. There was a sluggishness to their efforts—but, of course, that was the way of the skaa. The peasants were an indolent, unproductive lot. They didn’t complain, of course; they knew better than that. Instead, they simply worked with bowed heads, moving about their work with quiet apathy. The passing whip of a taskmaster would force them into dedicated motion for a few moments, but as soon as the taskmaster passed, they would return to their languor.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;blockquote&gt;
&lt;p&gt;The second man was tall with a strong build. As he turned, Kelsier was able to see that a thick metal spike had been pounded tip-first through each of the man’s eyes. With shafts as wide as an eye socket, the nail-like spikes were long enough that their sharp points jutted out about an inch from the back of the man’s clean-shaven skull. The flat spike ends shone like two silvery disks, sticking out of the sockets in the front, where the eyes should have been. A Steel Inquisitor.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Exhalation by Ted Chiang&lt;/h3&gt;
&lt;figure&gt;&lt;img alt=&quot;Exhalation&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 220px) 220px, 100vw&quot; width=&quot;220&quot; height=&quot;334&quot; src=&quot;https://briansunter.com/_astro/Exhalation_1672630657446_0.CgLfr3Cv_Z1eMykK.webp&quot; srcset=&quot;https://briansunter.com/_astro/Exhalation_1672630657446_0.CgLfr3Cv_Z1eMykK.webp 220w&quot; /&gt;&lt;figcaption&gt;Exhalation&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;a href=&quot;https://www.amazon.com/dp/B07PP9MXPL?tag=bsunter06-20&quot;&gt;Amazon Link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A series of short science fictions exploring philosophical topics, such as time travel, free will, entropy, and artificial intelligence. Extremely creative with a wide variety of settings, from a race of robots with mechanical lungs to time travel in ancient baghdad.&lt;/p&gt;
&lt;p&gt;I enjoyed some of the stories much more than others. In general, I liked the shorter stories such as “The Merchant and the Alchemist’s Gate,” “Exhalation,” and “What’s Expected of Us” more than the longer stories like “The Lifecycle of Software Objects.” I also greatly enjoyed the author’s explanation about what inspired him to write each story at the end of each chapter.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;For most of history, the proposition that we draw life from air was so obvious that there was no need to assert it. Every day we consume two lungs heavy with air; every day we remove the empty ones from our chest and replace them with full ones. If a person is careless and lets his air level run too low, he feels the heaviness of his limbs and the growing need for replenishment. It is exceedingly rare that a person is unable to get at least one replacement lung before his installed pair runs empty; on those unfortunate occasions where this has happened—when a person is trapped and unable to move, with no one nearby to assist him—he dies within seconds of his air running out.
But in the normal course of life, our need for air is far from our thoughts, and indeed many would say that satisfying that need is the least important part of going to the filling stations. For the filling stations are the primary venue for social conversation, the places from which we draw emotional sustenance as well as physical. We all keep spare sets of full lungs in our homes, but when one is alone, the act of opening one’s chest and replacing one’s lungs can seem little better than a chore. In the company of others, however, it becomes a communal activity, a shared pleasure.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;Shogun by James Clavell&lt;/h3&gt;
&lt;figure&gt;&lt;img alt=&quot;shogun&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 313px) 313px, 100vw&quot; width=&quot;313&quot; height=&quot;500&quot; src=&quot;https://briansunter.com/_astro/shogun_1672634122828_0.DdliRKHd_Z11zdR.webp&quot; srcset=&quot;https://briansunter.com/_astro/shogun_1672634122828_0.DdliRKHd_Z11zdR.webp 313w&quot; /&gt;&lt;figcaption&gt;shogun&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;a href=&quot;https://www.amazon.com/dp/B00SNM5552?tag=bsunter06-20&quot;&gt;Amazon Link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;An English boat captain is stranded in the 1600s Edo period in japan and gets embroiled in an epic battle for the shogunate among the Japanese feudal lords. Extremely loosely based on a real sailor who managed commerce for the real-life Tokugawa shogunate.&lt;/p&gt;
&lt;p&gt;This book was extremely fun for a westerner interested in Asian history and a great adventure story.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The young man was ten paces away. He wore breeches and clogs and a light kimono and two scabbarded swords were stuck into his belt. One was daggerlike. The other, a two-handed killing sword, was long and slightly curved. His right hand was casually on the hilt.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;blockquote&gt;
&lt;p&gt;Onushi ittai doko kara kitanoda? Doko no kuni no monoda?
The priest said nervously, “Kasigi Omi-san says, ‘Where do you come from and what’s your nationality?’ ”
“Is Mr. Omi-san the &lt;em&gt;daimyo&lt;/em&gt;?” Blackthorne asked, afraid of the swords in spite of himself.
“No. He’s a samurai, the samurai in charge of the village. His surname’s Kasigi, Omi’s his given name. Here they always put their surnames first. ‘San’ means ‘honorable,’ and you add it to all names as a politeness.
You’d better learn to be polite—and find some manners quickly. Here they don’t tolerate lack of manners.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;Minority Report by Phillip K. Dick&lt;/h3&gt;
&lt;figure&gt;&lt;img alt=&quot;minority&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 326px) 326px, 100vw&quot; width=&quot;326&quot; height=&quot;500&quot; src=&quot;https://briansunter.com/_astro/minority_1672634296433_0.BRR4hrJN_Z1iDXAG.webp&quot; srcset=&quot;https://briansunter.com/_astro/minority_1672634296433_0.BRR4hrJN_Z1iDXAG.webp 326w&quot; /&gt;&lt;figcaption&gt;minority&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;a href=&quot;https://www.amazon.com/dp/1596065982?tag=bsunter06-20&quot;&gt;Amazon Link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In the future, the government invents a way to predict crime before it happens and start arresting future criminals for the crime they’re about to commit. The head of the precrime unit discovers he’s about to be accused of precrime and goes on the run.&lt;/p&gt;
&lt;p&gt;This was an excellent short science fiction story with great pacing. It presents an extremely thought-provoking dilemma of justice. It feels relevant in the age of AI, where in the near future, governments may monitor you and come after you if a system says you’re likely to commit a crime. The plot and central message were completely different than the movie.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;“With the aid of your precog mutants, you’ve successfully abolished the post-crime punitive system of jails and fines. As we all realize, punishment was never much of a deterrent, and could scarcely comforted a victim already dead”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;“You’ve probably grasped the basic legalistic drawback to precrime methodology. We’re taking in individuals who have broken no law.”
“But they surely will”
“Happily they don’t - because we get them first, before they can commit an act of violence.”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;“Precrime has cut down felonies by ninety-nine and decimal point eight percent. We seldom get actual murder or treason. After all, the culprit knows we’ll confine him in the detention camp a week before he gets a chance to commit the crime.”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;“In our society we have no major crimes but we do have a detention camp full of would-be criminals.”
We claim they’re culpable. They, on the other hand, eternally claim they’re innocent. And, in a sense, they are innocent.”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;The Little Prince by Antoine de Saint-Exupéry&lt;/h3&gt;
&lt;figure&gt;&lt;img alt=&quot;little-prince&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 391px) 391px, 100vw&quot; width=&quot;391&quot; height=&quot;500&quot; src=&quot;https://briansunter.com/_astro/little-prince_1672634527260_0.y92sP7tQ_Z21OdYx.webp&quot; srcset=&quot;https://briansunter.com/_astro/little-prince_1672634527260_0.y92sP7tQ_Z21OdYx.webp 391w&quot; /&gt;&lt;figcaption&gt;little-prince&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;a href=&quot;https://www.amazon.com/dp/9386538229?tag=bsunter06-20&quot;&gt;Amazon Link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A short children’s book about a young prince visiting various planets and discovering the meaning of love and friendship. It encourages being open-minded, exploring, and maintaining your childlike sense of wonder.&lt;/p&gt;
&lt;p&gt;A very short yet enjoyable read and inspires you not to be a boring grown-up.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;What does that mean—‘tame’?”
“It is an act too often neglected,” said the fox. “It means to establish ties.”
“’To establish ties’?”
“Just that,” said the fox. “To me, you are still nothing more
than a little boy who is just like a hundred thousand other little
boys. And I have no need of you. And you, on your part, have no
need of me. To you, I am nothing more than a fox like a hundred
thousand other foxes. But if you tame me, then we shall need each
other. To me, you will be unique in all the world. To you, I shall
be unique in all the world…”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;Saga by Brian K. Vaughan and Fiona Staples&lt;/h3&gt;
&lt;figure&gt;&lt;img alt=&quot;saga&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1200px) 1200px, 100vw&quot; width=&quot;1200&quot; height=&quot;1845&quot; src=&quot;https://briansunter.com/_astro/saga_1672635052100_0.BFOwNVJd_1fAepf.webp&quot; srcset=&quot;https://briansunter.com/_astro/saga_1672635052100_0.BFOwNVJd_Z1j6jEJ.webp 640w, https://briansunter.com/_astro/saga_1672635052100_0.BFOwNVJd_Z1fw7y2.webp 750w, https://briansunter.com/_astro/saga_1672635052100_0.BFOwNVJd_1e5Pk3.webp 828w, https://briansunter.com/_astro/saga_1672635052100_0.BFOwNVJd_2c80qM.webp 1080w, https://briansunter.com/_astro/saga_1672635052100_0.BFOwNVJd_1fAepf.webp 1200w&quot; /&gt;&lt;figcaption&gt;saga&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;a href=&quot;https://www.amazon.com/dp/1632150786?tag=bsunter06-20&quot;&gt;Amazon Link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A science fiction graphic novel about a never ending war betwen two species on different planets. Two members of the opposing faction fall in love and try to survive while protecting their newborn daughter&lt;/p&gt;
&lt;p&gt;I loved the bounty hunter’s “Lying Cat,” who had the psychic ability to sense when someone was lying and could only speak a single word: “Lying.”&lt;/p&gt;
&lt;p&gt;Amazing artwork, incredibly creative and imaginative characters and settings, and very sexual.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;saga-14&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 761px) 761px, 100vw&quot; width=&quot;761&quot; height=&quot;1141&quot; src=&quot;https://briansunter.com/_astro/saga-14_1672731345885_0.DiNT_o1r_1IvVyM.webp&quot; srcset=&quot;https://briansunter.com/_astro/saga-14_1672731345885_0.DiNT_o1r_ZUl9Ns.webp 640w, https://briansunter.com/_astro/saga-14_1672731345885_0.DiNT_o1r_Z1rme5C.webp 750w, https://briansunter.com/_astro/saga-14_1672731345885_0.DiNT_o1r_1IvVyM.webp 761w&quot; /&gt;&lt;figcaption&gt;saga-14&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h3&gt;The Dark Knight Returns by Frank Miller&lt;/h3&gt;
&lt;figure&gt;&lt;img alt=&quot;dark-knight&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 600px) 600px, 100vw&quot; width=&quot;600&quot; height=&quot;922&quot; src=&quot;https://briansunter.com/_astro/dark-knight_1672635481754_0.f7-ggt22_i5pm6.webp&quot; srcset=&quot;https://briansunter.com/_astro/dark-knight_1672635481754_0.f7-ggt22_i5pm6.webp 600w&quot; /&gt;&lt;figcaption&gt;dark-knight&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;a href=&quot;https://www.amazon.com/dp/1401263119?tag=bsunter06-20&quot;&gt;Amazon Link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Bruce Wayne comes out of retirement at age 55 to fight crime and save Gotham from corruption. This comic helped start the genre of grim mature, and gritty comic books, in contrast to the more lighthearted comics that were popular at the time.&lt;/p&gt;
&lt;p&gt;I liked it quite a bit. Batman is a very human superhero in this book, especially at 55, compared to most seemingly invulnerable superheroes. It’s a great story of someone incredibly uncompromising fighting back against crime, the corrupt establishment, and the apathy to moral decay.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;dark-knight&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 600px) 600px, 100vw&quot; width=&quot;600&quot; height=&quot;913&quot; src=&quot;https://briansunter.com/_astro/dark-knight_1672731748148_0.fDxN_bTC_ghgKX.webp&quot; srcset=&quot;https://briansunter.com/_astro/dark-knight_1672731748148_0.fDxN_bTC_ghgKX.webp 600w&quot; /&gt;&lt;figcaption&gt;dark-knight&lt;/figcaption&gt;&lt;/figure&gt;
&lt;figure&gt;&lt;img alt=&quot;batman-2&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 948px) 948px, 100vw&quot; width=&quot;948&quot; height=&quot;1442&quot; src=&quot;https://briansunter.com/_astro/batman-2_1672782289208_0.-sQudKa__uuuae.webp&quot; srcset=&quot;https://briansunter.com/_astro/batman-2_1672782289208_0.-sQudKa__1NPGbs.webp 640w, https://briansunter.com/_astro/batman-2_1672782289208_0.-sQudKa__9kldo.webp 750w, https://briansunter.com/_astro/batman-2_1672782289208_0.-sQudKa__Z2itkb1.webp 828w, https://briansunter.com/_astro/batman-2_1672782289208_0.-sQudKa__uuuae.webp 948w&quot; /&gt;&lt;figcaption&gt;batman-2&lt;/figcaption&gt;&lt;/figure&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Building a Second Brain - Summary</title><link>https://briansunter.com/building-a-second-brain</link><guid isPermaLink="true">https://briansunter.com/building-a-second-brain</guid><description>My summary of Building a Second Brain by Tiago Forte, which is a guide to developing a productivity system to manage information and produce creative works.</description><pubDate>Fri, 30 Dec 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/basb_1672455079106_0.TSPs7pBV_Z1SIDP0.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;figure&gt;&lt;img alt=&quot;basb&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 394px) 394px, 100vw&quot; width=&quot;394&quot; height=&quot;598&quot; src=&quot;https://briansunter.com/_astro/basb_1672455079106_0.TSPs7pBV_DLHeV.webp&quot; srcset=&quot;https://briansunter.com/_astro/basb_1672455079106_0.TSPs7pBV_DLHeV.webp 394w&quot; /&gt;&lt;figcaption&gt;basb&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2&gt;The Book in 3 Sentences&lt;/h2&gt;
&lt;p&gt;Tiago Forte’s Building a Second Brain book is a guide to developing a productivity system that helps you better manage information and improve your creativity, productivity, and ability to generate insights.&lt;/p&gt;
&lt;p&gt;Forte teaches readers to create a digital system, or a “second brain,” to help them capture, organize and structure their thoughts, ideas, and to-dos.&lt;/p&gt;
&lt;p&gt;The heart of the Second Brain process is a workflow called &lt;strong&gt;CODE&lt;/strong&gt;: &lt;strong&gt;Capture&lt;/strong&gt;, &lt;strong&gt;Organize&lt;/strong&gt;, &lt;strong&gt;Distill&lt;/strong&gt;, and &lt;strong&gt;Express&lt;/strong&gt;.&lt;/p&gt;
&lt;h2&gt;Impressions&lt;/h2&gt;
&lt;p&gt;I enjoyed the book overall and the CODE process he outlines in the book.&lt;/p&gt;
&lt;p&gt;I’m a big fan of tool-agnostic workflows and philosophical frameworks for productivity. There’s a tendency for people to be tool-obsessed, but it’s better to be able to describe your workflow in plain English, then select a tool that supports that workflow.&lt;/p&gt;
&lt;p&gt;For a book about summarization, it’s wordy, and there are a lot of anecdotes and tangents. This additional background and context might be helpful to those beginning notetaking, but as someone following Forte for several years, I found them lengthy and unnecessary.&lt;/p&gt;
&lt;h2&gt;Who Should Read It?&lt;/h2&gt;
&lt;p&gt;Someone completely new to productivity and notetaking&lt;/p&gt;
&lt;p&gt;Someone wanting an overview of Forte’s thinking. It’s a good summarization of the material he’s put out over the past several years.&lt;/p&gt;
&lt;p&gt;Someone looking for a good tool agnostic notetaking workflow framework&lt;/p&gt;
&lt;p&gt;Someone who liked similar books such as Getting Things Done by David Allen or How to Take Smart notes by Sönke Ahrens.&lt;/p&gt;
&lt;h2&gt;How the Book Changed Me&lt;/h2&gt;
&lt;p&gt;This book inspired my current notetaking system. I organize my notes based on specific projects and categorize them into broad life areas, similar to the PARA project organization structure he proposes.&lt;/p&gt;
&lt;p&gt;I loosely follow the progressive summarization idea but only sometimes do the second-pass highlighting. It’s hard to be selective in what you capture while still needing enough context to do two passes of highlighting. I plan on being selective but initially capturing more context, for example, whole paragraphs instead of individual sentences.&lt;/p&gt;
&lt;p&gt;The project checklist and weekly review are good ideas that I incorporated into my notetaking system.&lt;/p&gt;
&lt;p&gt;I like the idea of having different “modes” of working, like “convergent” mode and “divergent” mode. In divergent mode (Capture and Organize), you cast a wide net and let your curiosity guide you. In convergent mode (Distill and Express), you focus on the task at hand. This book encouraged me to minimize mode shifts while working. For example, instead of finding an article, summarizing it, then finding another article, I would capture a bunch, then summarize them during a dedicated time.&lt;/p&gt;
&lt;h2&gt;My Top 3 Quotes&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;What’s the point of knowing something if it doesn’t positively impact anyone, not even yourself?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Your job as a notetaker is to preserve the notes you’re taking on the things you discover in such a way that they can survive the journey into the future. That way your excitement and enthusiasm for your knowledge builds over time instead of fading away&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;PARA isn’t a filing system; it’s a production system. It’s no use trying to find the “perfect place” where a note or file belongs. There isn’t one. The whole system is constantly shifting and changing in sync with your constantly changing life.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Summary + Notes&lt;/h2&gt;
&lt;h2&gt;CODE&lt;/h2&gt;
&lt;figure&gt;&lt;img alt=&quot;code&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 350px) 350px, 100vw&quot; width=&quot;350&quot; height=&quot;144&quot; src=&quot;https://briansunter.com/_astro/code_1672433388815_0.B_mN17up_2qbO89.webp&quot; srcset=&quot;https://briansunter.com/_astro/code_1672433388815_0.B_mN17up_2qbO89.webp 350w&quot; /&gt;&lt;figcaption&gt;code&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2&gt;Capture&lt;/h2&gt;
&lt;p&gt;The second brain process starts by capturing information that resonates with you from external sources or your internal moments of insight.&lt;/p&gt;
&lt;p&gt;Capturing information frees you from the burden of trying to remember everything and helps you focus on the higher-level creative process.&lt;/p&gt;
&lt;h4&gt;Examples of external sources to capture&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Highlights&lt;/strong&gt;: insightful passages from books or articles you read&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Quotes&lt;/strong&gt;: memorable passages from podcasts, audiobooks, or videos&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Bookmarks and favorites&lt;/strong&gt;: links to content you found on the internet or social media&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Meeting notes&lt;/strong&gt;: notes or ideas from meetings or calls&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Images&lt;/strong&gt;: photos or other images you find inspiring and interesting&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;Examples of internal sources to capture&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Stories&lt;/strong&gt;: things that happened to you or someone else&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Insights&lt;/strong&gt;: realizations or random ideas that pop into your head&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Memories&lt;/strong&gt;: experiences from your life that you don’t want to forget&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Reflections&lt;/strong&gt;: personal thoughts and lessons&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;How to decide what to capture&lt;/h4&gt;
&lt;p&gt;You want to avoid capturing too much information or too little, so Forte offers insights on deciding what to capture.&lt;/p&gt;
&lt;p&gt;In a piece of content, some parts are more valuable than others. Many people start by capturing too much. You shouldn’t be saving entire articles to your second brain.&lt;/p&gt;
&lt;p&gt;The primary advice is to capture things that resonate with you&lt;/p&gt;
&lt;p&gt;Ask yourself:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Does it inspire me?&lt;/li&gt;
&lt;li&gt;Is it useful?&lt;/li&gt;
&lt;li&gt;Is it personal?&lt;/li&gt;
&lt;li&gt;Is it surprising?&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;Favorite questions&lt;/h4&gt;
&lt;p&gt;Another technique that helps decide what to capture is having a list of “favorite questions” and capturing any information that relates to these questions.&lt;/p&gt;
&lt;p&gt;The scientist Richard Feynman used this technique.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;You have to keep a dozen of your favorite problems constantly present in your mind, although by and large they will lay in a dormant state. Every time you hear or read a new trick or a new result, test it against each of your twelve problems to see whether it helps. Every once in a while there will be a hit, and people will say, “How did he do it? He must be a genius!”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Ask yourself, “What are the questions I’ve always been interested in?”&lt;/p&gt;
&lt;p&gt;This could include grand, sweeping questions like “How can we make society fairer and more equitable?” as well as practical ones like “How can I make it a habit to exercise every day?”&lt;/p&gt;
&lt;p&gt;It might include questions about relationships, such as “How can I have closer relationships with the people I love?” or productivity, like “How can I spend more of my time doing high-value work?”&lt;/p&gt;
&lt;h5&gt;Examples of favorite questions&lt;/h5&gt;
&lt;blockquote&gt;
&lt;p&gt;How do I live less in the past, and more in the present?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;How do I build an investment strategy that is aligned with my mid-term and long-term goals and commitments?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;What does it look like to move from mindless consumption to mindful creation?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;How can I go to bed early instead of watching shows after the kids go to bed?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;How can my industry become more ecologically sustainable while remaining profitable?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;How can I work through the fear I have of taking on more responsibility?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;How can my school provide more resources for students with special needs?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;How do I start reading all the books I already have instead of buying more?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;How can I speed up and relax at the same time?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;How can we make the healthcare system more responsive&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h4&gt;Capture tools&lt;/h4&gt;
&lt;p&gt;You should leverage technology to make it easier to capture information and automatically send it to your second brain.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Note-taking apps&lt;/strong&gt; let you store, search, and organize your content.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Read-it-later apps&lt;/strong&gt; let you save interesting articles for later and highlight passages in them.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Ebook readers&lt;/strong&gt; often let you highlight and export those highlights to your second brain.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Web clippers&lt;/strong&gt; let you save and highlight parts of web pages.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Podcast clippers&lt;/strong&gt; let you save excerpts and transcribe them to text.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;YouTube capture tools&lt;/strong&gt; let you save portions of YouTube videos as transcripts to your notes.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Voice memos&lt;/strong&gt; let you record your voice and transcribe it to text for your notes.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Organize&lt;/h2&gt;
&lt;p&gt;As you capture information, you’ll need a system to organize and retrieve it.&lt;/p&gt;
&lt;p&gt;You want to avoid following elaborate rules for organizing your information. Your system needs to be simple and flexible. We don’t want to spend more time organizing our information than putting it to use.&lt;/p&gt;
&lt;p&gt;You might be tempted to organize things by “subjects,” but this is suboptimal. For example, you might consider putting an article in a “psychology” folder. But under what circumstances will you scroll through all your articles related to the broad subject of “psychology”?&lt;/p&gt;
&lt;p&gt;Organizing your information around focused projects and broad areas of your life is better.&lt;/p&gt;
&lt;p&gt;Forte proposes an organization structure called &lt;strong&gt;PARA&lt;/strong&gt;, which stands for Project, Area, Resource, and Archive.&lt;/p&gt;
&lt;h3&gt;PARA&lt;/h3&gt;
&lt;h4&gt;Projects&lt;/h4&gt;
&lt;p&gt;Short-term efforts in your work or life that you’re working on now.&lt;/p&gt;
&lt;p&gt;Projects have a beginning and an end.&lt;/p&gt;
&lt;p&gt;Projects also have a clear outcome needed for the project to be considered “done.”&lt;/p&gt;
&lt;h5&gt;Examples of projects&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Projects at work&lt;/strong&gt;: Complete web-page design; Create slide deck for conference; Develop project schedule; Plan recruitment drive.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Personal projects&lt;/strong&gt;: Finish Spanish language course; Plan vacation; Buy new living room furniture; Find local volunteer opportunity.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Side projects&lt;/strong&gt;: Publish blog post; Launch crowdfunding campaign; Research best podcast microphone; Complete online course.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;Areas&lt;/h4&gt;
&lt;p&gt;Projects are the main focus of the PARA system, but not everything is a project.&lt;/p&gt;
&lt;p&gt;Some things in our lives, like “finances,” don’t have a definite end date and require an ongoing effort; these are called &lt;strong&gt;areas&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Usually, projects are associated with an area.&lt;/p&gt;





























&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Project&lt;/th&gt;&lt;th&gt;Area&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Lose 10 pounds&lt;/td&gt;&lt;td&gt;Health&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Publish a book&lt;/td&gt;&lt;td&gt;Writing&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Save 3 months of expenses&lt;/td&gt;&lt;td&gt;Finance&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Create app mockup&lt;/td&gt;&lt;td&gt;Product design&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Develop Contract Template&lt;/td&gt;&lt;td&gt;Legal&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;h5&gt;Examples of areas&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Activities or places you are responsible for&lt;/strong&gt;: Home/apartment; Cooking; Travel; Car.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;People you are responsible for or accountable to&lt;/strong&gt;: Friends; Kids; Spouse; Pets.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Standards of performance you are responsible for&lt;/strong&gt;: Health; Personal growth; Friendships; Finances.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Departments or functions you are responsible for&lt;/strong&gt;: Account management; Marketing; Operations; Product development.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;People or teams you are responsible for or accountable to&lt;/strong&gt;: Direct reports; Manager; Board of directors; Suppliers.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Standards of performance you are responsible for&lt;/strong&gt;: Professional development; Sales and marketing; Relationships and networking; Recruiting and hiring.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;Resources&lt;/h4&gt;
&lt;p&gt;Resources are a catchall for everything that isn’t an area or project.&lt;/p&gt;
&lt;p&gt;It’s a personal library of references, facts, and inspiration.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What topics are you interested in? Architecture; Interior design; English literature; Beer brewing.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;What subjects are you researching? Habit formation; Notetaking; Project management; Nutrition. What useful information do you want to be able to reference?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Vacation itineraries; Life goals; Stock photos; Product testimonials.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Which hobbies or passions do you have? Coffee; Classic movies; Hip-hop music; Japanese anime.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h4&gt;Archives&lt;/h4&gt;
&lt;p&gt;Archives are things you’ve completed or put on hold.&lt;/p&gt;
&lt;p&gt;For example:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Completed or canceled projects&lt;/li&gt;
&lt;li&gt;Areas of responsibility that are no longer relevant&lt;/li&gt;
&lt;li&gt;Resources that are no longer relevant, for example, hobbies you’ve discontinued&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;How to decide where to put notes&lt;/h4&gt;
&lt;p&gt;The moment you decide to capture something isn’t the best time to organize it.&lt;/p&gt;
&lt;p&gt;You need more time to consider the note before organizing it. Also, it increases the friction in capturing notes.&lt;/p&gt;
&lt;p&gt;You should separate capture and organize into distinct steps.&lt;/p&gt;
&lt;p&gt;Here’s a workflow for deciding where to put a newly captured note:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;In which project will this be most useful?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If none: In which area will this be most useful?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If none: Which resource does this belong to?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If none: Place in archives.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;blockquote&gt;
&lt;p&gt;You are always trying to place a note or file not only where it will be useful, but where it will be useful the soonest.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Don’t organize ideas where they came from; organize them based on where they’re going and what projects they’re relevant to&lt;/p&gt;
&lt;p&gt;PARA isn’t just about organizing your notes but also about identifying the structure of your life.&lt;/p&gt;
&lt;h2&gt;Distill&lt;/h2&gt;
&lt;p&gt;It’s important to distill notes to their most essential points so they are helpful in the future. Summarizing helps you quickly refresh your memory on a note without rereading the whole thing.&lt;/p&gt;
&lt;p&gt;You don’t have to go through all the layers. You can tune the amount of summarization you do based on how important the note is and how much time you have.&lt;/p&gt;
&lt;h2&gt;Progressive Summarization&lt;/h2&gt;
&lt;figure&gt;&lt;img alt=&quot;progressive-summary&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1204px) 1204px, 100vw&quot; width=&quot;1204&quot; height=&quot;794&quot; src=&quot;https://briansunter.com/_astro/progressive-summary_1672433105894_0.BpGIZr1D_OdSV5.webp&quot; srcset=&quot;https://briansunter.com/_astro/progressive-summary_1672433105894_0.BpGIZr1D_Z2b3FMn.webp 640w, https://briansunter.com/_astro/progressive-summary_1672433105894_0.BpGIZr1D_Z2uKEA6.webp 750w, https://briansunter.com/_astro/progressive-summary_1672433105894_0.BpGIZr1D_Z215WI3.webp 828w, https://briansunter.com/_astro/progressive-summary_1672433105894_0.BpGIZr1D_IC067.webp 1080w, https://briansunter.com/_astro/progressive-summary_1672433105894_0.BpGIZr1D_OdSV5.webp 1204w&quot; /&gt;&lt;figcaption&gt;progressive-summary&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Forte’s progressive summarization workflow helps you distill notes down to the most important points&lt;/p&gt;
&lt;p&gt;Highlight the main points of a note&lt;/p&gt;
&lt;p&gt;Highlight the main points of those highlights&lt;/p&gt;
&lt;p&gt;And so on, distilling the essence of a note in several “layers.”&lt;/p&gt;
&lt;h3&gt;Layer one - Captured notes&lt;/h3&gt;
&lt;p&gt;Layer one is the excerpts of the articles you’ve captured.&lt;/p&gt;
&lt;p&gt;Don’t try to capture the entire article.&lt;/p&gt;
&lt;h3&gt;Layer two - Bolding the most important parts&lt;/h3&gt;
&lt;p&gt;Layer two is where you bold the main points of your captured note: phrases that capture the essence of what the author is trying to say.&lt;/p&gt;
&lt;p&gt;This step and the subsequent steps should be done when you have time for focused work, not at the time of capture.&lt;/p&gt;
&lt;p&gt;These bolded passes are much faster to look back on than reading the entire article or your captured excerpts. It might only take a minute to refresh your memory instead of several minutes reading your full excerpts.&lt;/p&gt;
&lt;h3&gt;Layer three- Highlighting the bolded passages&lt;/h3&gt;
&lt;p&gt;Layer three highlights only the most critical points of the bolded passages from layer two.&lt;/p&gt;
&lt;p&gt;This optional step is reserved for particularly long, interesting, or valuable notes.&lt;/p&gt;
&lt;p&gt;These highlights are often just a few sentences or half sentences from everything you’ve captured.&lt;/p&gt;
&lt;h3&gt;Layer four - Executive Summary&lt;/h3&gt;
&lt;p&gt;The executive summary is a few bullet points at the top of your note summarizing the article in your own words.&lt;/p&gt;
&lt;p&gt;This is usually only done for your most valuable notes, which you return to often.&lt;/p&gt;
&lt;h3&gt;Common Mistakes&lt;/h3&gt;
&lt;h4&gt;Highlighting too much&lt;/h4&gt;
&lt;p&gt;Don’t highlight paragraph after paragraph of text or capture entire books or articles.&lt;/p&gt;
&lt;p&gt;Each layer in Progressive Summarization should only include about 20% of the previous layer.&lt;/p&gt;
&lt;h4&gt;Highlighting without a purpose in mind&lt;/h4&gt;
&lt;p&gt;When should you be doing progressive summarization? When you are getting ready to create something&lt;/p&gt;
&lt;p&gt;It takes time to distill your notes, so wait until you have a clear purpose. Otherwise, you’re investing significant time without knowing if it will pay off.&lt;/p&gt;
&lt;p&gt;One rule of thumb is to make the note a little more discoverable every time you “touch” it by summarizing or adding a commentary.&lt;/p&gt;
&lt;h4&gt;Making highlighting difficult&lt;/h4&gt;
&lt;p&gt;Don’t overthink highlighting; rely on your intuition.&lt;/p&gt;
&lt;p&gt;Use tools that make highlighting easy.&lt;/p&gt;
&lt;h2&gt;Express&lt;/h2&gt;
&lt;p&gt;The ultimate goal of the system is to produce creative work and share it&lt;/p&gt;
&lt;p&gt;The system is meant to set you up for success by leveraging your prior notes and work instead of reinventing the wheel every time you start something.&lt;/p&gt;
&lt;p&gt;Examples of previous work you can leverage:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Distilled notes&lt;/strong&gt;: Books or articles you’ve read and distilled.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Outtakes&lt;/strong&gt;: The material or ideas that didn’t make it into a past project but could be used in future ones.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Work-in-process&lt;/strong&gt;: The documents, graphics, agendas, or plans you produced during past projects.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Final deliverables&lt;/strong&gt;: Concrete pieces of work you’ve delivered as part of past projects, which could become components of something new.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Documents created by others&lt;/strong&gt;: Knowledge assets created by people on your team, contractors or consultants, or even clients or customers, that you can reference and incorporate into your work.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;How to resurface your past work&lt;/h3&gt;
&lt;h4&gt;Search&lt;/h4&gt;
&lt;p&gt;Digital notetaking systems have a considerable advantage over physical systems: you can search their entire contents in less than a second.&lt;/p&gt;
&lt;p&gt;This should be the first retrieval method you turn to, and it’s most beneficial when you already know what you’re looking for.&lt;/p&gt;
&lt;h4&gt;Browsing&lt;/h4&gt;
&lt;p&gt;If you’ve followed the second brain system, you already have your notes categorized by projects and areas.&lt;/p&gt;
&lt;p&gt;Browsing is slower than search but lets you gradually hone in on the information you’re looking for&lt;/p&gt;
&lt;p&gt;It’s helpful to take advantage of sorting, such as by date created.&lt;/p&gt;
&lt;h4&gt;Tags&lt;/h4&gt;
&lt;p&gt;Tags allow you to apply labels to notes regardless of location.&lt;/p&gt;
&lt;p&gt;The problem with folders is that they can silo information, so tags are good for cross-cutting information and sparking interesting connections.&lt;/p&gt;
&lt;p&gt;You might have a frequently asked question page for a project and tag it with FAQ. Then you can see the different FAQs across different projects.&lt;/p&gt;
&lt;p&gt;The downside of tags is they require a lot of energy compared to searches and folders.&lt;/p&gt;
&lt;h4&gt;Serendipity&lt;/h4&gt;
&lt;p&gt;Sometimes a connection will jump out at you.&lt;/p&gt;
&lt;p&gt;We can’t plan for this, but we can create conditions where it is more likely to happen.&lt;/p&gt;
&lt;p&gt;One tip is to keep your focus broad when using the previous retrieval methods. Don’t just search in a specific folder; look through related folders too.&lt;/p&gt;
&lt;p&gt;You may want to look through five or six of your PARA folders, which you’ve ideally already summarized, so that it won’t take too much time.&lt;/p&gt;
&lt;p&gt;Also, you can use visuals to amplify serendipity. Save images as well as text notes.&lt;/p&gt;
&lt;p&gt;Another powerful method is sharing your ideas with others. Feedback from others is unpredictable. They may be uninterested in something you think is fascinating or find something you think is obvious to be mind-blowing.&lt;/p&gt;
&lt;p&gt;Other people can give you valuable feedback, such as pointing out aspects of your ideas or sources to consider.&lt;/p&gt;
&lt;h2&gt;Essential notetaking habits&lt;/h2&gt;
&lt;figure&gt;&lt;img alt=&quot;basb-project&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 543px) 543px, 100vw&quot; width=&quot;543&quot; height=&quot;289&quot; src=&quot;https://briansunter.com/_astro/basb-project_1672457363980_0.CDscvco0_Z2kj6YS.webp&quot; srcset=&quot;https://briansunter.com/_astro/basb-project_1672457363980_0.CDscvco0_Z2kj6YS.webp 543w&quot; /&gt;&lt;figcaption&gt;basb-project&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;How do we create sustainable habits and routines to build “compound interest” from our projects, notes, and knowledge?&lt;/p&gt;
&lt;h2&gt;Project Checklists&lt;/h2&gt;
&lt;p&gt;Ensure you start and consistently finish your projects leveraging past work.&lt;/p&gt;
&lt;p&gt;The two most important moments in projects are when you start and finish them.&lt;/p&gt;
&lt;p&gt;Since these moments are so important, you should have a defined process.&lt;/p&gt;
&lt;h2&gt;Project kickoff checklist&lt;/h2&gt;
&lt;h3&gt;1. Capture your current thinking on the project&lt;/h3&gt;
&lt;p&gt;Create a dedicated note for the project and start brainstorming&lt;/p&gt;
&lt;p&gt;This is a messy step where you should consider potential approaches, how it relates to other topics, people you should consult, etc.&lt;/p&gt;
&lt;p&gt;Forte has a lists of questions he asks himself:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What do I already know about this project?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;What don’t I know that I need to find out?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;What is my goal or intention?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Who can I talk to who might provide insights?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;What can I read or listen to for relevant ideas?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;2. Review notes from folders and tags&lt;/h3&gt;
&lt;p&gt;Look through existing notes that could be relevant to the new project.&lt;/p&gt;
&lt;p&gt;Browse through a handful of folders that contain summarized notes&lt;/p&gt;
&lt;h3&gt;3. Search for related terms across all folders&lt;/h3&gt;
&lt;p&gt;Search through your notes, which are more focused and higher quality than the stuff on the internet&lt;/p&gt;
&lt;h3&gt;4. Tag relevant notes to the project&lt;/h3&gt;
&lt;p&gt;You can use the features from your notetaking app to tag, link, or move relevant notes to the project.&lt;/p&gt;
&lt;h3&gt;5. Create an outline of collected notes and plan the project&lt;/h3&gt;
&lt;p&gt;Create an outline that makes it clear what you should do next&lt;/p&gt;
&lt;p&gt;This should be a plan for tackling the project rather than starting the actual execution.&lt;/p&gt;
&lt;p&gt;The first pass of outlining should only take 20-30 minutes.&lt;/p&gt;
&lt;p&gt;For an essay, these are the main points or headings of the final piece.&lt;/p&gt;
&lt;p&gt;If it’s a collaborative project, you should outline each person’s objectives and areas of responsibility.&lt;/p&gt;
&lt;h3&gt;More ideas for your project kickoff checklist&lt;/h3&gt;
&lt;h3&gt;Answer premortem questions:&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;What do you want to learn?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;What is the greatest source of uncertainty or most important question you want to answer?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;What is most likely to fail?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Communicate with stakeholders&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;Explain to your manager, colleagues, clients, customers, shareholders, contractors, etc., what the project is about and why it matters.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Define success criteria:&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;What needs to happen for this project to be considered successful?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;What are the minimum results you need to achieve, or the “stretch goals” you’re striving for?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Have an official kickoff:&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;Schedule check-in calls, make a budget and timeline, and write out the goals and objectives to make sure everyone is informed, aligned, and clear on what is expected of them. I find that doing an official kickoff is useful even if it’s a solo project!&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Project completion checklist&lt;/h2&gt;
&lt;p&gt;Completing a project is unique because it is a rare moment when something ends.&lt;/p&gt;
&lt;h3&gt;1. Mark project as complete&lt;/h3&gt;
&lt;p&gt;When all the tasks as done, mark the project as complete in your notetaking app&lt;/p&gt;
&lt;h3&gt;2. Cross out the associated project goal and move to “Completed” section.&lt;/h3&gt;
&lt;p&gt;Review the goal of the project and reflect on how it panned out&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;If you were successful, why? What should you repeat next time?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;If you fell short, what happened? What can you change to avoid making the same mistakes?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;3. Review and organize parts that could be reused&lt;/h3&gt;
&lt;p&gt;Often components of your projects can be reused in the future.&lt;/p&gt;
&lt;p&gt;For example, a web page design could be used as a template for future sites, an agenda for a one-on-one performance review, or interview questions you used for hiring.&lt;/p&gt;
&lt;h3&gt;4. Move project to archives across all platforms.&lt;/h3&gt;
&lt;p&gt;Archive the project to get it out of the way and avoid it cluttering up your environment&lt;/p&gt;
&lt;h3&gt;5. If canceled or paused, record current status&lt;/h3&gt;
&lt;p&gt;If you cancel or postpone a project, you can archive it but mark the current status with some comments.&lt;/p&gt;
&lt;p&gt;For example, could you describe your last action and why you postponed it?&lt;/p&gt;
&lt;h3&gt;More ideas for project completion checklist&lt;/h3&gt;
&lt;h4&gt;Answer postmortem questions:&lt;/h4&gt;
&lt;blockquote&gt;
&lt;p&gt;What did you learn?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;What did you do well?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;What could you have done better?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;What can you improve for next time?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h4&gt;Communicate with stakeholders:&lt;/h4&gt;
&lt;blockquote&gt;
&lt;p&gt;Notify your manager, colleagues, clients, customers, shareholders, contractors, etc., that the project is complete and what the outcomes were.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h4&gt;Evaluate success criteria&lt;/h4&gt;
&lt;blockquote&gt;
&lt;p&gt;Were the objectives of the project achieved?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Why or why not?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;What was the return on investment?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h4&gt;Tie up loose ends&lt;/h4&gt;
&lt;blockquote&gt;
&lt;p&gt;Send any last emails, invoices, receipts, feedback forms, or documents&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h4&gt;Celebrate&lt;/h4&gt;
&lt;blockquote&gt;
&lt;p&gt;Celebrate your accomplishments with your team or collaborators so you receive the feeling of fulfillment for all the effort you put in.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Weekly and Monthly Reviews&lt;/h2&gt;
&lt;p&gt;Periodically review your work and life and decide if you want to change anything.&lt;/p&gt;
&lt;p&gt;The idea of weekly reviews comes from David Allen’s book Getting Things Done&lt;/p&gt;
&lt;h3&gt;Weekly review template&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Clear email inbox&lt;/li&gt;
&lt;li&gt;Check calendar&lt;/li&gt;
&lt;li&gt;Clear computer desktop&lt;/li&gt;
&lt;li&gt;Clear notes inbox&lt;/li&gt;
&lt;li&gt;Choose my tasks for the week&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Monthly review template&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Review and update goals&lt;/li&gt;
&lt;li&gt;Review and update project list&lt;/li&gt;
&lt;li&gt;Review areas of responsibility&lt;/li&gt;
&lt;li&gt;Review someday/maybe tasks&lt;/li&gt;
&lt;li&gt;Reprioritize tasks&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Noticing Habits&lt;/h3&gt;
&lt;p&gt;Notice small opportunities to edit, highlight, or move notes to make them more discoverable for your future self.&lt;/p&gt;
&lt;p&gt;It takes too much work to stop and organize everything all at once, and it’s easier to add and manage notes a little bit at a time while living our lives.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Noticing that an idea you have in mind could potentially be valuable and capturing it instead of thinking, “Oh, it’s nothing.”&lt;/li&gt;
&lt;li&gt;Noticing when an idea you’re reading about resonates with you and taking those extra few seconds to highlight it.&lt;/li&gt;
&lt;li&gt;Noticing that a note could use a better title and changing it so it’s easier for your future self to find it.&lt;/li&gt;
&lt;li&gt;Noticing you could move or link a note to another project or area where it will be more useful.&lt;/li&gt;
&lt;li&gt;Noticing opportunities to combine two or more notes into a new, larger work so you don’t have to start it from scratch.&lt;/li&gt;
&lt;li&gt;Noticing a chance to merge similar content from different notes into the same note so it’s not spread around too many places.&lt;/li&gt;
&lt;/ul&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>AI Learning Resources</title><link>https://briansunter.com/ai-learning-resources</link><guid isPermaLink="true">https://briansunter.com/ai-learning-resources</guid><description>Best resources for studying machine learning</description><pubDate>Fri, 09 Dec 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/1071614177.01._SCLZZZZZZZ_SX500_1670647404075_0.Y1IkIAoN_Z1yc04.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;I’m very eager to start studying AI, but with so much to learn, I’m not sure where to start. Do I need a lot of math? What kind? Which areas should I focus on? How can I make sense of all the topics? What tools should I use? And how is the field developing, and what direction is it headed in?&lt;/p&gt;
&lt;p&gt;I’m a software engineer with some math under my belt, and my goal is to gain a thorough understanding of AI so I can apply it to my work. I’m particularly interested in generative AI, natural language processing, and building intelligent agents. I also want to gain the necessary math skills to understand the fundamentals, but I don’t want to get too bogged down in some of the advanced mathematical details.&lt;/p&gt;
&lt;p&gt;To help me on this journey, I’ve collected and summarized the best courses and books to help me get started on the right foot. I included the topics covered by each resource, so the list got pretty long, but it gives me a better idea of what to prioritize and how things fit together.&lt;/p&gt;
&lt;p&gt;These materials are roughly in order I plan to study them, though some of the materials at the end are pretty advanced. I want to start by getting a practical overview, then go deep on the math and fundamentals.&lt;/p&gt;
&lt;p&gt;I plan on starting with some of the most popular courses, like Andrew Ng’s Deeplearning.ai courses and the fast.ai courses.&lt;/p&gt;
&lt;p&gt;Next, I plan to take a few other high quality courses like the 3blue1brown math YouTube courses, the HuggingFace course, and Andrej Karpathy’s Neural Network courses.&lt;/p&gt;
&lt;p&gt;Then I plan to study a variety of O’Reilly books focused on practical topics.&lt;/p&gt;
&lt;p&gt;Finally, I plan to study more in depth materials, such as a Berkeley AI course, some math textbooks, and some of the famous AI textbooks.&lt;/p&gt;
&lt;h2&gt;&lt;a href=&quot;https://www.coursera.org/specializations/machine-learning-introduction&quot;&gt;Deeplearning AI Intro Course&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Introductory course by Andrew Ng covering practical machine learning topics using Python&lt;/p&gt;
&lt;p&gt;Time: 2.5 months (5 hours/week)&lt;/p&gt;
&lt;h3&gt;Topics&lt;/h3&gt;
&lt;h4&gt;Supervised learning&lt;/h4&gt;
&lt;p&gt;Linear regression&lt;/p&gt;
&lt;p&gt;Logistic regression&lt;/p&gt;
&lt;p&gt;Neural networks&lt;/p&gt;
&lt;p&gt;Decision trees&lt;/p&gt;
&lt;p&gt;Tree Ensembles&lt;/p&gt;
&lt;h4&gt;Unsupervised learning&lt;/h4&gt;
&lt;p&gt;Clustering&lt;/p&gt;
&lt;p&gt;Dimensionality reduction&lt;/p&gt;
&lt;p&gt;Recommender systems&lt;/p&gt;
&lt;p&gt;Anomaly detection&lt;/p&gt;
&lt;h4&gt;Tools&lt;/h4&gt;
&lt;p&gt;Python&lt;/p&gt;
&lt;p&gt;numpy&lt;/p&gt;
&lt;p&gt;scikit learn&lt;/p&gt;
&lt;p&gt;Tensorflow&lt;/p&gt;
&lt;p&gt;XGBoost&lt;/p&gt;
&lt;h4&gt;Best Practices&lt;/h4&gt;
&lt;p&gt;Regularization to Avoid Overfitting&lt;/p&gt;
&lt;p&gt;Evaluating and tuning models&lt;/p&gt;
&lt;p&gt;Improving performance&lt;/p&gt;
&lt;h2&gt;Deeplearning.ai Deep Learning Course&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://www.deeplearning.ai/courses/deep-learning-specialization/&quot;&gt;Course Link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Practical intermediate deep learning course by Andrew Ng&lt;/p&gt;
&lt;h3&gt;Topics&lt;/h3&gt;
&lt;p&gt;Tensorflow&lt;/p&gt;
&lt;p&gt;Artificial Neural Networks&lt;/p&gt;
&lt;p&gt;Convolutional Neural Networks&lt;/p&gt;
&lt;p&gt;Recurrent Neural Networks&lt;/p&gt;
&lt;p&gt;Transformers&lt;/p&gt;
&lt;p&gt;Python Programming&lt;/p&gt;
&lt;p&gt;Deep Learning&lt;/p&gt;
&lt;p&gt;Backpropagation&lt;/p&gt;
&lt;p&gt;Optimization&lt;/p&gt;
&lt;p&gt;Hyperparameter Tuning&lt;/p&gt;
&lt;p&gt;Machine Learning&lt;/p&gt;
&lt;p&gt;Transfer Learning&lt;/p&gt;
&lt;p&gt;Multi-Task Learning&lt;/p&gt;
&lt;p&gt;Object Detection and Segmentation&lt;/p&gt;
&lt;p&gt;Facial Recognition System&lt;/p&gt;
&lt;p&gt;Gated Recurrent Unit (GRU)&lt;/p&gt;
&lt;p&gt;Long Short Term Memory (LSTM)&lt;/p&gt;
&lt;p&gt;Attention Models&lt;/p&gt;
&lt;p&gt;Natural Language Processing&lt;/p&gt;
&lt;h2&gt;Practical Deep Learning Fast.ai&lt;/h2&gt;
&lt;p&gt;A free course designed for people with some coding experience, who want to learn how to apply deep learning and machine learning to practical problems.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://course.fast.ai/&quot;&gt;Course Link&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Topics&lt;/h3&gt;
&lt;p&gt;Deployment&lt;/p&gt;
&lt;p&gt;Neural net foundations&lt;/p&gt;
&lt;p&gt;Natural Language (NLP)&lt;/p&gt;
&lt;p&gt;From-scratch model&lt;/p&gt;
&lt;p&gt;Random forests&lt;/p&gt;
&lt;p&gt;Collaborative filtering&lt;/p&gt;
&lt;p&gt;Convolutions (CNNs)&lt;/p&gt;
&lt;h2&gt;Deeplearning.ai Natural Language Course&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://www.deeplearning.ai/courses/natural-language-processing-specialization/&quot;&gt;Course Link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;How to design NLP applications that perform question-answering and sentiment analysis, create tools to translate languages, summarize text, and even build chatbots.&lt;/p&gt;
&lt;p&gt;Time: 4 months (6 hours/week)&lt;/p&gt;
&lt;h3&gt;Topics&lt;/h3&gt;
&lt;p&gt;Sentiment Analysis&lt;/p&gt;
&lt;p&gt;Transformers&lt;/p&gt;
&lt;p&gt;Attention Models&lt;/p&gt;
&lt;p&gt;Machine Translation&lt;/p&gt;
&lt;p&gt;Word2vec&lt;/p&gt;
&lt;p&gt;Word Embeddings&lt;/p&gt;
&lt;p&gt;Locality-Sensitive Hashing&lt;/p&gt;
&lt;p&gt;Vector Space Models&lt;/p&gt;
&lt;p&gt;Parts-of-Speech Tagging&lt;/p&gt;
&lt;p&gt;N-gram Language Models&lt;/p&gt;
&lt;p&gt;Autocorrect&lt;/p&gt;
&lt;p&gt;Sentiment with Neural Networks&lt;/p&gt;
&lt;p&gt;Siamese Networks&lt;/p&gt;
&lt;p&gt;Natural Language Generation&lt;/p&gt;
&lt;p&gt;Named Entity Recognition (NER)&lt;/p&gt;
&lt;p&gt;Reformer Models&lt;/p&gt;
&lt;p&gt;Neural Machine Translation&lt;/p&gt;
&lt;p&gt;Chatbots&lt;/p&gt;
&lt;p&gt;T5 + BERT Models&lt;/p&gt;
&lt;h2&gt;Deeplearning.ai Tensorflow Data and Deployment Course&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://www.deeplearning.ai/courses/tensorflow-data-and-deployment-specialization/&quot;&gt;Course Link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Learn how to get your machine learning models into the hands of real people on all kinds of devices. Start by understanding how to train and run machine learning models in browsers and in mobile applications. Learn how to leverage built-in datasets with just a few lines of code, learn about data pipelines with TensorFlow data services, use APIs to control data splitting, process all types of unstructured data and retrain deployed models with user data while maintaining data privacy.&lt;/p&gt;
&lt;p&gt;Time: 4 months (3 hours/week)&lt;/p&gt;
&lt;h3&gt;Topics&lt;/h3&gt;
&lt;p&gt;Tensorflow&lt;/p&gt;
&lt;p&gt;Object Detection&lt;/p&gt;
&lt;p&gt;JavaScript&lt;/p&gt;
&lt;p&gt;Convolutional Neural Network&lt;/p&gt;
&lt;p&gt;Tensorflow.js&lt;/p&gt;
&lt;p&gt;Tensorflow Lite&lt;/p&gt;
&lt;p&gt;Mathematical Optimization&lt;/p&gt;
&lt;p&gt;Extraction, Transformation And Loading (ETL)&lt;/p&gt;
&lt;p&gt;Data Pipelines&lt;/p&gt;
&lt;h2&gt;Deeplearning.ai Generative Adversarial Networks Course&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://www.deeplearning.ai/courses/generative-adversarial-networks-gans-specialization/&quot;&gt;Course Link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Introduction to image generation with GANs, charting a path from foundational concepts to advanced techniques through an easy-to-understand approach.&lt;/p&gt;
&lt;p&gt;Time: 3 months (8 hours/week)&lt;/p&gt;
&lt;h3&gt;Topics&lt;/h3&gt;
&lt;p&gt;Generator&lt;/p&gt;
&lt;p&gt;Image-to-Image Translation&lt;/p&gt;
&lt;p&gt;Glossary of Computer Graphics&lt;/p&gt;
&lt;p&gt;Discriminator&lt;/p&gt;
&lt;p&gt;Generative Adversarial Networks&lt;/p&gt;
&lt;p&gt;Controllable Generation&lt;/p&gt;
&lt;p&gt;WGANs&lt;/p&gt;
&lt;p&gt;Conditional Generation&lt;/p&gt;
&lt;p&gt;Components of GANs&lt;/p&gt;
&lt;p&gt;DCGANs&lt;/p&gt;
&lt;p&gt;Bias in GANs&lt;/p&gt;
&lt;p&gt;StyleGANs&lt;/p&gt;
&lt;h2&gt;Deeplearning.ai Tensorflow Advanced&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://www.deeplearning.ai/courses/tensorflow-advanced-techniques-specialization/&quot;&gt;Course Link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Expand your knowledge of the Functional API and build exotic non-sequential model types. You will learn how to optimize training in different environments with multiple processors and chip types and get introduced to advanced computer vision scenarios such as object detection, image segmentation, and interpreting convolutions. You will also explore generative deep learning including the ways AIs can create new content from Style Transfer to Auto Encoding, VAEs, and GANs.&lt;/p&gt;
&lt;p&gt;Time: 5 months (6 hours/week)&lt;/p&gt;
&lt;h3&gt;Topics&lt;/h3&gt;
&lt;p&gt;Model Interpretability&lt;/p&gt;
&lt;p&gt;Custom Training Loops&lt;/p&gt;
&lt;p&gt;Custom and Exotic Models&lt;/p&gt;
&lt;p&gt;Generative Machine Learning&lt;/p&gt;
&lt;p&gt;Object Detection&lt;/p&gt;
&lt;p&gt;Functional API&lt;/p&gt;
&lt;p&gt;Custom Layers&lt;/p&gt;
&lt;p&gt;Custom and Exotic Models with Functional API&lt;/p&gt;
&lt;p&gt;Custom Loss Functions&lt;/p&gt;
&lt;p&gt;Distribution Strategies&lt;/p&gt;
&lt;p&gt;Basic Tensor Functionality&lt;/p&gt;
&lt;p&gt;GradientTape for Optimization&lt;/p&gt;
&lt;h2&gt;Deeplearning.ai MLOps Course&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://www.deeplearning.ai/courses/machine-learning-engineering-for-production-mlops/&quot;&gt;Course Link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;How to conceptualize, build, and maintain integrated systems that continuously operate in production.&lt;/p&gt;
&lt;p&gt;Time: 4 months (5 hours/week)&lt;/p&gt;
&lt;h3&gt;Topics&lt;/h3&gt;
&lt;p&gt;Data Pipelines&lt;/p&gt;
&lt;p&gt;Model Pipelines&lt;/p&gt;
&lt;p&gt;Deploy Pipelines&lt;/p&gt;
&lt;p&gt;Managing Machine Learning Production systems&lt;/p&gt;
&lt;p&gt;ML Deployment Challenges&lt;/p&gt;
&lt;p&gt;Project Scoping and Design&lt;/p&gt;
&lt;p&gt;Concept Drift&lt;/p&gt;
&lt;p&gt;Model Baseline&lt;/p&gt;
&lt;p&gt;Human-level Performance (HLP)&lt;/p&gt;
&lt;p&gt;TensorFlow Extended (TFX)&lt;/p&gt;
&lt;p&gt;ML Metadata&lt;/p&gt;
&lt;p&gt;Data transformation&lt;/p&gt;
&lt;p&gt;Data augmentation&lt;/p&gt;
&lt;p&gt;Data validation&lt;/p&gt;
&lt;p&gt;AutoML&lt;/p&gt;
&lt;p&gt;Precomputing predictions&lt;/p&gt;
&lt;p&gt;Fairness Indicators&lt;/p&gt;
&lt;p&gt;Explainable AI&lt;/p&gt;
&lt;p&gt;Model Performance Analysis&lt;/p&gt;
&lt;p&gt;TensorFlow Serving&lt;/p&gt;
&lt;p&gt;Model Monitoring&lt;/p&gt;
&lt;p&gt;General Data Protection Regulation (GDPR)&lt;/p&gt;
&lt;p&gt;Model Registries&lt;/p&gt;
&lt;h2&gt;Deeplearning.ai Data Science on AWS Course&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://www.deeplearning.ai/courses/practical-data-science-specialization/&quot;&gt;Course Link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Develop the practical skills to effectively deploy your data science projects and overcome challenges at each step of the ML workflow using Amazon SageMaker.&lt;/p&gt;
&lt;p&gt;Time: 3 months (5 hours/week)&lt;/p&gt;
&lt;h3&gt;Topics&lt;/h3&gt;
&lt;p&gt;Automated Machine Learning (AutoML)&lt;/p&gt;
&lt;p&gt;Natural Language Processing with BERT&lt;/p&gt;
&lt;p&gt;ML Pipelines and ML Operations (MLOps)&lt;/p&gt;
&lt;p&gt;A/B Testing, Model Deployment, and Monitoring&lt;/p&gt;
&lt;p&gt;Data Labeling at Scale&lt;/p&gt;
&lt;p&gt;Data Ingestion&lt;/p&gt;
&lt;p&gt;Exploratory Data Analysis&lt;/p&gt;
&lt;p&gt;Statistical Data Bias Detection&lt;/p&gt;
&lt;p&gt;Multi-class Classification with FastText and BlazingText&lt;/p&gt;
&lt;p&gt;Feature Engineering and Feature Store&lt;/p&gt;
&lt;p&gt;Model Training, Tuning, and Deployment with BERT&lt;/p&gt;
&lt;p&gt;Model Debugging, Profiling, and Evaluation&lt;/p&gt;
&lt;p&gt;ML Pipelines and MLOps&lt;/p&gt;
&lt;p&gt;Artifact and Lineage Tracking&lt;/p&gt;
&lt;p&gt;Distributed Model Training and Hyperparameter Tuning&lt;/p&gt;
&lt;p&gt;Cost Savings and Performance Improvements&lt;/p&gt;
&lt;p&gt;Human-in-the-Loop Pipelines&lt;/p&gt;
&lt;h2&gt;Hugging Face Course&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://huggingface.co/course/chapter1/1&quot;&gt;Course Link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This course will teach you about natural language processing (NLP) using libraries from the Hugging Face ecosystem (🤗 Transformers, 🤗 Datasets, 🤗 Tokenizers, and 🤗 Accelerate) and the Hugging Face Hub.&lt;/p&gt;
&lt;h3&gt;Topics&lt;/h3&gt;
&lt;p&gt;Transformer Models&lt;/p&gt;
&lt;p&gt;Fine-tuning a pretrained model&lt;/p&gt;
&lt;p&gt;Sharing models and tokenizers&lt;/p&gt;
&lt;p&gt;Datasets library&lt;/p&gt;
&lt;p&gt;Tokenizers Library&lt;/p&gt;
&lt;p&gt;Building and sharing demos&lt;/p&gt;
&lt;p&gt;Optimizing for production&lt;/p&gt;
&lt;h2&gt;Hugging Face Diffusion Models Class&lt;/h2&gt;
&lt;figure&gt;&lt;img alt=&quot;hfdiffusion&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 318px) 318px, 100vw&quot; width=&quot;318&quot; height=&quot;159&quot; src=&quot;https://briansunter.com/_astro/hfdiffusion_1670997592570_0.WCG-TkPL_mMcD1.webp&quot; srcset=&quot;https://briansunter.com/_astro/hfdiffusion_1670997592570_0.WCG-TkPL_mMcD1.webp 318w&quot; /&gt;&lt;figcaption&gt;hfdiffusion&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/huggingface/diffusion-models-class&quot;&gt;Course Link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;👩‍🎓 Study the theory behind diffusion models&lt;/p&gt;
&lt;p&gt;🧨 Learn how to generate images and audio with the popular 🤗 Diffusers library&lt;/p&gt;
&lt;p&gt;🏋️‍♂️ Train your own diffusion models from scratch&lt;/p&gt;
&lt;p&gt;📻 Fine-tune existing diffusion models on new datasets&lt;/p&gt;
&lt;p&gt;🗺 Explore conditional generation and guidance&lt;/p&gt;
&lt;p&gt;🧑‍🔬 Create your own custom diffusion model pipelines&lt;/p&gt;
&lt;h3&gt;Topics&lt;/h3&gt;
&lt;p&gt;pytorch&lt;/p&gt;
&lt;p&gt;Diffusers and diffusion models&lt;/p&gt;
&lt;p&gt;Fine-tuning&lt;/p&gt;
&lt;p&gt;Stable Diffusion&lt;/p&gt;
&lt;h2&gt;Hugging Face Deep Reinforcement Learning Course&lt;/h2&gt;
&lt;figure&gt;&lt;img alt=&quot;thumbnail&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1920px) 1920px, 100vw&quot; width=&quot;1920&quot; height=&quot;1080&quot; src=&quot;https://briansunter.com/_astro/thumbnail_1670996834646_0.Bel34DlI_1ByKqd.webp&quot; srcset=&quot;https://briansunter.com/_astro/thumbnail_1670996834646_0.Bel34DlI_Z20Lhsf.webp 640w, https://briansunter.com/_astro/thumbnail_1670996834646_0.Bel34DlI_ZwD0eD.webp 750w, https://briansunter.com/_astro/thumbnail_1670996834646_0.Bel34DlI_1iItY0.webp 828w, https://briansunter.com/_astro/thumbnail_1670996834646_0.Bel34DlI_1qNJVH.webp 1080w, https://briansunter.com/_astro/thumbnail_1670996834646_0.Bel34DlI_Z2vX3bI.webp 1280w, https://briansunter.com/_astro/thumbnail_1670996834646_0.Bel34DlI_ZNFyK9.webp 1668w, https://briansunter.com/_astro/thumbnail_1670996834646_0.Bel34DlI_1ByKqd.webp 1920w&quot; /&gt;&lt;figcaption&gt;thumbnail&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/huggingface/deep-rl-class&quot;&gt;Course Link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;📖 Study Deep Reinforcement Learning in &lt;strong&gt;theory and practice.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;🧑‍💻 Learn to &lt;strong&gt;use famous Deep RL libraries&lt;/strong&gt; such as &lt;a href=&quot;https://stable-baselines3.readthedocs.io/en/master/&quot;&gt;Stable Baselines3&lt;/a&gt;, &lt;a href=&quot;https://github.com/DLR-RM/rl-baselines3-zoo&quot;&gt;RL Baselines3 Zoo&lt;/a&gt;, &lt;a href=&quot;https://samplefactory.dev/&quot;&gt;Sample Factory&lt;/a&gt; and &lt;a href=&quot;https://github.com/vwxyzjn/cleanrl&quot;&gt;CleanRL&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;🤖 &lt;strong&gt;Train agents in unique environments&lt;/strong&gt; such as &lt;a href=&quot;https://huggingface.co/spaces/ThomasSimonini/SnowballFight&quot;&gt;SnowballFight&lt;/a&gt;, &lt;a href=&quot;https://huggingface.co/spaces/ThomasSimonini/Huggy&quot;&gt;Huggy the Doggo 🐶&lt;/a&gt;, &lt;a href=&quot;https://minerl.readthedocs.io/en/latest/&quot;&gt;MineRL (Minecraft ⛏️)&lt;/a&gt;, &lt;a href=&quot;https://vizdoom.cs.put.edu.pl/&quot;&gt;VizDoom (Doom)&lt;/a&gt; and classical ones such as &lt;a href=&quot;https://www.gymlibrary.dev/environments/atari/&quot;&gt;Space Invaders&lt;/a&gt; and &lt;a href=&quot;https://github.com/bulletphysics/bullet3&quot;&gt;PyBullet&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;💾 Share your &lt;strong&gt;trained agents with one line of code to the Hub&lt;/strong&gt; and also download powerful agents from the community.&lt;/p&gt;
&lt;p&gt;🏆 Participate in challenges where you will &lt;strong&gt;evaluate your agents against other teams. You’ll also get to play against the agents you’ll train.&lt;/strong&gt;&lt;/p&gt;
&lt;h3&gt;Topics&lt;/h3&gt;
&lt;p&gt;Q-Learning&lt;/p&gt;
&lt;p&gt;Policy Gradient with PyTorch&lt;/p&gt;
&lt;p&gt;Actor Critic Methods&lt;/p&gt;
&lt;p&gt;Proximal Policy Optimization&lt;/p&gt;
&lt;p&gt;Multi-Agents&lt;/p&gt;
&lt;p&gt;Decision Transformers&lt;/p&gt;
&lt;p&gt;offline Reinforcement Learning&lt;/p&gt;
&lt;h2&gt;Andrej Karpathy Neural Networks Zero to Hero Course&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://karpathy.ai/zero-to-hero.html&quot;&gt;Course Link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This is the most step-by-step spelled-out explanation of backpropagation and training of neural networks. It only assumes basic knowledge of Python and a vague recollection of calculus from high school.&lt;/p&gt;
&lt;h4&gt;Topics&lt;/h4&gt;
&lt;p&gt;Backpropagation&lt;/p&gt;
&lt;p&gt;pytorch&lt;/p&gt;
&lt;p&gt;Multi-layer perceptron&lt;/p&gt;
&lt;p&gt;Loss function&lt;/p&gt;
&lt;p&gt;Gradient descent optimization&lt;/p&gt;
&lt;p&gt;Bigrams&lt;/p&gt;
&lt;p&gt;Vector normalization&lt;/p&gt;
&lt;p&gt;Tensor broadcasting&lt;/p&gt;
&lt;p&gt;Model smoothing&lt;/p&gt;
&lt;p&gt;One-hot encodings&lt;/p&gt;
&lt;p&gt;Vectorized loss&lt;/p&gt;
&lt;p&gt;Embeddings&lt;/p&gt;
&lt;p&gt;Hidden layers&lt;/p&gt;
&lt;p&gt;Negative log likelihood loss&lt;/p&gt;
&lt;p&gt;Cross entropy&lt;/p&gt;
&lt;p&gt;Overfitting&lt;/p&gt;
&lt;p&gt;Learning rate&lt;/p&gt;
&lt;p&gt;Character embeddings&lt;/p&gt;
&lt;p&gt;Sampling from models&lt;/p&gt;
&lt;p&gt;Google colab&lt;/p&gt;
&lt;p&gt;TanH activation function&lt;/p&gt;
&lt;p&gt;Batch normalization&lt;/p&gt;
&lt;p&gt;Forward pass activation statistics&lt;/p&gt;
&lt;p&gt;Backward pass gradient&lt;/p&gt;
&lt;p&gt;Kaiming init&lt;/p&gt;
&lt;p&gt;Parameter activation&lt;/p&gt;
&lt;p&gt;Gradient statistics&lt;/p&gt;
&lt;p&gt;Batchnorm&lt;/p&gt;
&lt;h2&gt;3blue1brown YouTube courses&lt;/h2&gt;
&lt;h3&gt;Neural Networks from the Ground Up&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/playlist?list=PLZHQObOWTQDNU6R1_67000Dx_ZCJB-3pi&quot;&gt;Playlist Link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The basics of neural networks, and the math behind how they learn.&lt;/p&gt;
&lt;h4&gt;Topics&lt;/h4&gt;
&lt;p&gt;Neural Networks&lt;/p&gt;
&lt;p&gt;Gradient Descent&lt;/p&gt;
&lt;p&gt;Backpropagation&lt;/p&gt;
&lt;h3&gt;Essence of Linear Algebra&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/playlist?list=PLZHQObOWTQDPD3MizzM2xVFitgF8hE_ab&quot;&gt;Playlist Link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;An introduction to visualizing what matrices are really doing.&lt;/p&gt;
&lt;h4&gt;Topics&lt;/h4&gt;
&lt;p&gt;Vectors&lt;/p&gt;
&lt;p&gt;Linear Combinations&lt;/p&gt;
&lt;p&gt;Span&lt;/p&gt;
&lt;p&gt;Basis Vectors&lt;/p&gt;
&lt;p&gt;Linear Transformation&lt;/p&gt;
&lt;p&gt;Matrices&lt;/p&gt;
&lt;p&gt;Matrix Multiplication&lt;/p&gt;
&lt;p&gt;Three dimensional linear transformations&lt;/p&gt;
&lt;p&gt;Determinant&lt;/p&gt;
&lt;p&gt;Inverse Matrices&lt;/p&gt;
&lt;p&gt;Column Space&lt;/p&gt;
&lt;p&gt;Null Space&lt;/p&gt;
&lt;p&gt;Nonsquare Matrices&lt;/p&gt;
&lt;p&gt;Dot Product&lt;/p&gt;
&lt;p&gt;Duality&lt;/p&gt;
&lt;p&gt;Cross Products&lt;/p&gt;
&lt;p&gt;Cramer’s Rule&lt;/p&gt;
&lt;p&gt;Change of basis&lt;/p&gt;
&lt;p&gt;Eigenvectors and Eigenvalues&lt;/p&gt;
&lt;p&gt;Abstract Vector spaces&lt;/p&gt;
&lt;h3&gt;Essence of Calculus&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/playlist?list=PLZHQObOWTQDMsr9K-rj53DwVRMYO3t5Yr&quot;&gt;Playlist Link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Visual introductions to the core ideas of derivatives, integrals, limits, and more.&lt;/p&gt;
&lt;h4&gt;Topics&lt;/h4&gt;
&lt;p&gt;Derivative&lt;/p&gt;
&lt;p&gt;Chain Rule&lt;/p&gt;
&lt;p&gt;Product Rule&lt;/p&gt;
&lt;p&gt;Euler’s Number&lt;/p&gt;
&lt;p&gt;Implicit Differentiation&lt;/p&gt;
&lt;p&gt;Limits&lt;/p&gt;
&lt;p&gt;L’Hôpital’s rule&lt;/p&gt;
&lt;p&gt;Epsilon Delta&lt;/p&gt;
&lt;p&gt;Integration&lt;/p&gt;
&lt;p&gt;Fundamental Theorem of Calculus&lt;/p&gt;
&lt;p&gt;Higher Order Derivatives&lt;/p&gt;
&lt;p&gt;Taylor Series&lt;/p&gt;
&lt;h3&gt;Probability&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/playlist?list=PLZHQObOWTQDMOGOhvk3y_IXJF-O0Jt6lk&quot;&gt;Playlist Link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;An assortment of introductory ideas in probability.&lt;/p&gt;
&lt;h4&gt;Topics&lt;/h4&gt;
&lt;p&gt;Bayes Theorem&lt;/p&gt;
&lt;p&gt;Binomial Distribution&lt;/p&gt;
&lt;p&gt;Probability Density Functions&lt;/p&gt;
&lt;h2&gt;Hands-On Machine Learning with Scikit-Learn and TensorFlow&lt;/h2&gt;
&lt;p&gt;By using concrete examples, minimal theory, and two production-ready Python frameworks (scikit-learn and TensorFlow), you gain an intuitive understanding of the concepts and tools for building intelligent systems. You’ll learn simple linear regression and progressing to deep neural networks. With exercises in each chapter to help you apply what you’ve learned, all you need is programming experience to get started.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://a.co/d/fOBe9wy&quot;&gt;Book Link&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Topics&lt;/h3&gt;
&lt;p&gt;Types of Machine Learning Systems&lt;/p&gt;
&lt;p&gt;Supervised/Unsupervised Learning&lt;/p&gt;
&lt;p&gt;Batch and Online Learning&lt;/p&gt;
&lt;p&gt;Instance-Based Versus Model-Based Learning&lt;/p&gt;
&lt;p&gt;Challenges of Machine Learning&lt;/p&gt;
&lt;p&gt;End-to-End Machine Learning Project&lt;/p&gt;
&lt;h4&gt;Classification&lt;/h4&gt;
&lt;p&gt;Binary Classifier&lt;/p&gt;
&lt;p&gt;Performance Measures&lt;/p&gt;
&lt;p&gt;Cross validation&lt;/p&gt;
&lt;p&gt;Confusion matrix&lt;/p&gt;
&lt;p&gt;Multiclass classification&lt;/p&gt;
&lt;h4&gt;Training Models&lt;/h4&gt;
&lt;p&gt;Linear Regressions&lt;/p&gt;
&lt;p&gt;Gradient Descent&lt;/p&gt;
&lt;p&gt;Polynomial Regression&lt;/p&gt;
&lt;p&gt;Learning Curves&lt;/p&gt;
&lt;p&gt;Regularized Linear Models&lt;/p&gt;
&lt;p&gt;Logistic Regression&lt;/p&gt;
&lt;p&gt;Support Vector Machines&lt;/p&gt;
&lt;p&gt;Linear SVM Classification&lt;/p&gt;
&lt;p&gt;Soft Margin Classification&lt;/p&gt;
&lt;p&gt;Nonlinear SVM Classification&lt;/p&gt;
&lt;p&gt;Decision Function and Predictions&lt;/p&gt;
&lt;p&gt;Training Objective&lt;/p&gt;
&lt;p&gt;Quadratic Programming&lt;/p&gt;
&lt;p&gt;The Dual Problem&lt;/p&gt;
&lt;p&gt;Kernelized SVMs&lt;/p&gt;
&lt;p&gt;Online SVMs&lt;/p&gt;
&lt;h4&gt;Decision Trees&lt;/h4&gt;
&lt;p&gt;Ensemble Learning and Random Forests&lt;/p&gt;
&lt;p&gt;Voting Classifiers&lt;/p&gt;
&lt;p&gt;Bagging and Pasting&lt;/p&gt;
&lt;p&gt;Bagging and Pasting in Scikit-Learn&lt;/p&gt;
&lt;p&gt;Out-of-Bag Evaluation&lt;/p&gt;
&lt;p&gt;Random Patches and Random Subspaces&lt;/p&gt;
&lt;p&gt;Random Forests&lt;/p&gt;
&lt;p&gt;Extra-Trees&lt;/p&gt;
&lt;p&gt;Feature Importance&lt;/p&gt;
&lt;p&gt;Boosting&lt;/p&gt;
&lt;p&gt;AdaBoost&lt;/p&gt;
&lt;p&gt;Gradient Boosting&lt;/p&gt;
&lt;h4&gt;Dimensionality Reduction&lt;/h4&gt;
&lt;p&gt;PCA&lt;/p&gt;
&lt;p&gt;Projection&lt;/p&gt;
&lt;p&gt;Manifold Learning&lt;/p&gt;
&lt;p&gt;Kernel PCA&lt;/p&gt;
&lt;p&gt;LLE&lt;/p&gt;
&lt;h4&gt;Unsupervised Learning&lt;/h4&gt;
&lt;p&gt;Clustering&lt;/p&gt;
&lt;p&gt;Gaussian Mixtures&lt;/p&gt;
&lt;h4&gt;Introduction to Artificial Neural Networks with Keras&lt;/h4&gt;
&lt;p&gt;From Biological to Artificial Neurons&lt;/p&gt;
&lt;p&gt;Implementing MLPs with Keras&lt;/p&gt;
&lt;p&gt;Fine-Tuning Neural Network Hyperparameters&lt;/p&gt;
&lt;h4&gt;Training Deep Neural Networks&lt;/h4&gt;
&lt;p&gt;Vanishing/Exploding Gradients Problems&lt;/p&gt;
&lt;p&gt;Reusing Pretrained Layers&lt;/p&gt;
&lt;p&gt;Faster Optimizers&lt;/p&gt;
&lt;p&gt;Avoiding Overfitting Through Regularization&lt;/p&gt;
&lt;h4&gt;Custom Models and Training with TensorFlow&lt;/h4&gt;
&lt;p&gt;Using TensorFlow like NumPy&lt;/p&gt;
&lt;p&gt;Customizing Models and Training Algorithms&lt;/p&gt;
&lt;p&gt;TensorFlow Functions and Graphs&lt;/p&gt;
&lt;h4&gt;Loading and Preprocessing Data with TensorFlow&lt;/h4&gt;
&lt;p&gt;Data API&lt;/p&gt;
&lt;p&gt;TFRecord&lt;/p&gt;
&lt;p&gt;Preprocessing the Input Features&lt;/p&gt;
&lt;p&gt;TF Transform&lt;/p&gt;
&lt;h4&gt;Deep Computer Vision Using Convolutional Neural Networks&lt;/h4&gt;
&lt;p&gt;Convolutional Layers&lt;/p&gt;
&lt;p&gt;Pooling Layers&lt;/p&gt;
&lt;p&gt;CNN Architectures&lt;/p&gt;
&lt;p&gt;Implementing a ResNet-34 CNN Using Keras&lt;/p&gt;
&lt;p&gt;Object Detection&lt;/p&gt;
&lt;p&gt;Semantic Segmentation&lt;/p&gt;
&lt;h4&gt;Processing Sequences Using RNNs and CNNs&lt;/h4&gt;
&lt;p&gt;Recurrent Neurons and Layers&lt;/p&gt;
&lt;p&gt;Training RNNs&lt;/p&gt;
&lt;p&gt;Forecasting a Time Series&lt;/p&gt;
&lt;p&gt;Handling Long Sequences&lt;/p&gt;
&lt;h4&gt;Natural Language Processing with RNNs and Attention&lt;/h4&gt;
&lt;p&gt;Generating Shakespearean Text Using a Character RNN&lt;/p&gt;
&lt;p&gt;Sentiment Analysis&lt;/p&gt;
&lt;p&gt;An Encoder–Decoder Network for Neural Machine Translation&lt;/p&gt;
&lt;p&gt;Attention Mechanisms&lt;/p&gt;
&lt;p&gt;Transformers&lt;/p&gt;
&lt;h4&gt;Representation Learning and Generative Learning Using Autoencoders and GANs&lt;/h4&gt;
&lt;p&gt;Stacked Autoencoders&lt;/p&gt;
&lt;p&gt;Generative Adversarial Networks&lt;/p&gt;
&lt;h4&gt;Reinforcement Learning&lt;/h4&gt;
&lt;p&gt;Policy Search&lt;/p&gt;
&lt;p&gt;Neural Network Policies&lt;/p&gt;
&lt;p&gt;Policy Gradients&lt;/p&gt;
&lt;p&gt;Q-Learning&lt;/p&gt;
&lt;p&gt;TF-Agents Library&lt;/p&gt;
&lt;h4&gt;Training and Deploying TensorFlow Models at Scale&lt;/h4&gt;
&lt;p&gt;Serving a TensorFlow Model&lt;/p&gt;
&lt;p&gt;Deploying a Model to a Mobile or Embedded Device&lt;/p&gt;
&lt;p&gt;Training Models Across Multiple Devices&lt;/p&gt;
&lt;h2&gt;SQL for Data Analysis&lt;/h2&gt;
&lt;figure&gt;&lt;img alt=&quot;714qourw99L&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 259px) 259px, 100vw&quot; width=&quot;259&quot; height=&quot;340&quot; src=&quot;https://briansunter.com/_astro/714qourw99L_1670744519576_0.DoKqX3SP_TQgb.webp&quot; srcset=&quot;https://briansunter.com/_astro/714qourw99L_1670744519576_0.DoKqX3SP_TQgb.webp 259w&quot; /&gt;&lt;figcaption&gt;714qourw99L&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;a href=&quot;https://a.co/d/i0ZpwDy&quot;&gt;Book Link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You’ll learn how to use both common and exotic SQL functions such as joins, window functions, subqueries, and regular expressions in new, innovative ways—as well as how to combine SQL techniques to accomplish your goals faster, with understandable code.&lt;/p&gt;
&lt;h3&gt;Topics&lt;/h3&gt;
&lt;p&gt;Databases&lt;/p&gt;
&lt;p&gt;Preparing Data for Analysis&lt;/p&gt;
&lt;p&gt;Data cleaning&lt;/p&gt;
&lt;p&gt;Deduplication&lt;/p&gt;
&lt;p&gt;Nulls&lt;/p&gt;
&lt;p&gt;Shaping data&lt;/p&gt;
&lt;p&gt;Time Series Data&lt;/p&gt;
&lt;p&gt;Dates and time&lt;/p&gt;
&lt;p&gt;Trends&lt;/p&gt;
&lt;p&gt;Windows&lt;/p&gt;
&lt;p&gt;Seasonality&lt;/p&gt;
&lt;p&gt;Cohort Analysis&lt;/p&gt;
&lt;p&gt;Retention&lt;/p&gt;
&lt;p&gt;Related Cohort Analysis&lt;/p&gt;
&lt;p&gt;Cross section analysis&lt;/p&gt;
&lt;p&gt;Text Analysis&lt;/p&gt;
&lt;p&gt;Anomaly Detection&lt;/p&gt;
&lt;p&gt;Experiment Analysis&lt;/p&gt;
&lt;p&gt;Complex Data Sets&lt;/p&gt;
&lt;h2&gt;Practical Statistics for Data Scientists&lt;/h2&gt;
&lt;figure&gt;&lt;img alt=&quot;149207294X.01. SCLZZZZZZZ SX500&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 381px) 381px, 100vw&quot; width=&quot;381&quot; height=&quot;500&quot; src=&quot;https://briansunter.com/_astro/149207294X.01._SCLZZZZZZZ_SX500_1670724734688_0.BzDbeNks_6O4Eu.webp&quot; srcset=&quot;https://briansunter.com/_astro/149207294X.01._SCLZZZZZZZ_SX500_1670724734688_0.BzDbeNks_6O4Eu.webp 381w&quot; /&gt;&lt;figcaption&gt;149207294X.01. SCLZZZZZZZ SX500&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;a href=&quot;https://a.co/d/69tMYZB&quot;&gt;Book Link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Many data science resources incorporate statistical methods but lack a deeper statistical perspective. If you’re familiar with the R or Python programming languages and have some exposure to statistics, this quick reference bridges the gap in an accessible, readable format.&lt;/p&gt;
&lt;h3&gt;Topics&lt;/h3&gt;
&lt;p&gt;Rectangular Data&lt;/p&gt;
&lt;p&gt;Data Frames&lt;/p&gt;
&lt;p&gt;Estimates&lt;/p&gt;
&lt;p&gt;Mean, median, mode, variability, percentile&lt;/p&gt;
&lt;p&gt;Distribution and sampling&lt;/p&gt;
&lt;p&gt;Bias, central limit theorem, standard error, resampling, confidence interval, normal distribution&lt;/p&gt;
&lt;p&gt;Normal, long tail, t, binomial, poisson, weibuill distributions&lt;/p&gt;
&lt;p&gt;Statistical Experiments and Significance Testing&lt;/p&gt;
&lt;p&gt;A/B testing, Hypothesis testing, null hypothesis&lt;/p&gt;
&lt;p&gt;Pvalue, alpha, t-test, anova, chi-square, multi arm bandit&lt;/p&gt;
&lt;p&gt;Regression and Prediction&lt;/p&gt;
&lt;p&gt;Simple Linear regression&lt;/p&gt;
&lt;p&gt;Multiple linear regression&lt;/p&gt;
&lt;p&gt;Confidence and prediction intervals&lt;/p&gt;
&lt;p&gt;Classification&lt;/p&gt;
&lt;p&gt;Naive bayes&lt;/p&gt;
&lt;p&gt;Discriminant analysis&lt;/p&gt;
&lt;p&gt;Logistic regression&lt;/p&gt;
&lt;p&gt;Imbalanced data&lt;/p&gt;
&lt;p&gt;Statistical Machine Learning&lt;/p&gt;
&lt;p&gt;KNN&lt;/p&gt;
&lt;p&gt;Tree models&lt;/p&gt;
&lt;p&gt;Bagging and Random Forest&lt;/p&gt;
&lt;p&gt;Boosting&lt;/p&gt;
&lt;p&gt;Unsupervised Learning&lt;/p&gt;
&lt;p&gt;Principal Components Analysis&lt;/p&gt;
&lt;p&gt;k-means clustering&lt;/p&gt;
&lt;p&gt;Hierarchal clustering&lt;/p&gt;
&lt;p&gt;Model Clustering&lt;/p&gt;
&lt;p&gt;Scaling and categorical variables&lt;/p&gt;
&lt;h2&gt;Essential Math for Data Science&lt;/h2&gt;
&lt;figure&gt;&lt;img alt=&quot;81RiDmmmEBL&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 244px) 244px, 100vw&quot; width=&quot;244&quot; height=&quot;320&quot; src=&quot;https://briansunter.com/_astro/81RiDmmmEBL_1670724182934_0.DgSWaxaD_xjhqF.webp&quot; srcset=&quot;https://briansunter.com/_astro/81RiDmmmEBL_1670724182934_0.DgSWaxaD_xjhqF.webp 244w&quot; /&gt;&lt;figcaption&gt;81RiDmmmEBL&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;a href=&quot;https://a.co/d/dWTNNj8&quot;&gt;Book Link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Master the math needed to excel in data science, machine learning, and statistics. In this book author Thomas Nield guides you through areas like calculus, probability, linear algebra, and statistics&lt;/p&gt;
&lt;h3&gt;Topics&lt;/h3&gt;
&lt;p&gt;Calculus&lt;/p&gt;
&lt;p&gt;Probability&lt;/p&gt;
&lt;p&gt;Linear algebra&lt;/p&gt;
&lt;p&gt;Vectors&lt;/p&gt;
&lt;p&gt;Matrices&lt;/p&gt;
&lt;p&gt;Matrix decomposition&lt;/p&gt;
&lt;p&gt;statistics&lt;/p&gt;
&lt;p&gt;p-values&lt;/p&gt;
&lt;p&gt;Statistical significance&lt;/p&gt;
&lt;p&gt;Linear regression&lt;/p&gt;
&lt;p&gt;Logistic regression&lt;/p&gt;
&lt;p&gt;Neural networks&lt;/p&gt;
&lt;p&gt;SymPy&lt;/p&gt;
&lt;p&gt;NumPy&lt;/p&gt;
&lt;p&gt;scikit-learn&lt;/p&gt;
&lt;p&gt;Data Science Career&lt;/p&gt;
&lt;h2&gt;Data Science from Scratch&lt;/h2&gt;
&lt;figure&gt;&lt;img alt=&quot;81SCVWF4A1L&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 244px) 244px, 100vw&quot; width=&quot;244&quot; height=&quot;320&quot; src=&quot;https://briansunter.com/_astro/81SCVWF4A1L_1670742445031_0.WcgwT7jj_ZCl7zx.webp&quot; srcset=&quot;https://briansunter.com/_astro/81SCVWF4A1L_1670742445031_0.WcgwT7jj_ZCl7zx.webp 244w&quot; /&gt;&lt;figcaption&gt;81SCVWF4A1L&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;a href=&quot;https://a.co/d/ipkNz6T&quot;&gt;Book Link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Get comfortable with the math and statistics at the core of data science, and with the hacking skills you need to get started as a data scientist. Packed with New material on deep learning, statistics, and natural language processing&lt;/p&gt;
&lt;h3&gt;Topics&lt;/h3&gt;
&lt;p&gt;Python&lt;/p&gt;
&lt;p&gt;Matplotlib&lt;/p&gt;
&lt;p&gt;Linear Algebra&lt;/p&gt;
&lt;p&gt;Vectors&lt;/p&gt;
&lt;p&gt;Matrices&lt;/p&gt;
&lt;p&gt;Statistics&lt;/p&gt;
&lt;p&gt;Probability&lt;/p&gt;
&lt;p&gt;Bayes Theorem&lt;/p&gt;
&lt;p&gt;Distribution&lt;/p&gt;
&lt;p&gt;Central Limit Theorem&lt;/p&gt;
&lt;p&gt;Hypothesis and Inference&lt;/p&gt;
&lt;p&gt;p-value&lt;/p&gt;
&lt;p&gt;Confidence intervals&lt;/p&gt;
&lt;p&gt;p-hacking&lt;/p&gt;
&lt;p&gt;Bayesian inference&lt;/p&gt;
&lt;p&gt;Gradient Descent&lt;/p&gt;
&lt;p&gt;Scraping Data&lt;/p&gt;
&lt;p&gt;Working with Data&lt;/p&gt;
&lt;p&gt;Dataclasses&lt;/p&gt;
&lt;p&gt;Rescaling&lt;/p&gt;
&lt;p&gt;Cleaning&lt;/p&gt;
&lt;p&gt;Rescaling&lt;/p&gt;
&lt;p&gt;Dimensionality reduction&lt;/p&gt;
&lt;p&gt;Machine learning&lt;/p&gt;
&lt;p&gt;Modeling&lt;/p&gt;
&lt;p&gt;Overfitting&lt;/p&gt;
&lt;p&gt;Bias-variance&lt;/p&gt;
&lt;p&gt;Feature extraction&lt;/p&gt;
&lt;p&gt;k-nearest neighbors&lt;/p&gt;
&lt;p&gt;Model&lt;/p&gt;
&lt;p&gt;Dimensionality&lt;/p&gt;
&lt;p&gt;Naive Bayes&lt;/p&gt;
&lt;p&gt;Simple Linear Regression&lt;/p&gt;
&lt;p&gt;Multiple Regression&lt;/p&gt;
&lt;p&gt;Logistic Regression&lt;/p&gt;
&lt;p&gt;Decision Tree&lt;/p&gt;
&lt;p&gt;Neural Networks&lt;/p&gt;
&lt;p&gt;Deep Learning&lt;/p&gt;
&lt;p&gt;Clustering&lt;/p&gt;
&lt;p&gt;Natural Language Processing&lt;/p&gt;
&lt;p&gt;Network Analysis&lt;/p&gt;
&lt;p&gt;Eigenvector&lt;/p&gt;
&lt;p&gt;Directed graphs&lt;/p&gt;
&lt;p&gt;Recommender Systems&lt;/p&gt;
&lt;p&gt;Collaborative Filtering&lt;/p&gt;
&lt;p&gt;Matrix Factorization&lt;/p&gt;
&lt;p&gt;Databases and SQL&lt;/p&gt;
&lt;p&gt;Mapreduce&lt;/p&gt;
&lt;p&gt;Python&lt;/p&gt;
&lt;p&gt;numpy&lt;/p&gt;
&lt;p&gt;pandas&lt;/p&gt;
&lt;p&gt;scikit-learn&lt;/p&gt;
&lt;p&gt;visualization&lt;/p&gt;
&lt;h2&gt;Practical Natural Language Processing&lt;/h2&gt;
&lt;figure&gt;&lt;img alt=&quot;91pDCEA5uTL&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 244px) 244px, 100vw&quot; width=&quot;244&quot; height=&quot;320&quot; src=&quot;https://briansunter.com/_astro/91pDCEA5uTL_1670750101817_0.C6t3Ubyj_2rF56P.webp&quot; srcset=&quot;https://briansunter.com/_astro/91pDCEA5uTL_1670750101817_0.C6t3Ubyj_2rF56P.webp 244w&quot; /&gt;&lt;figcaption&gt;91pDCEA5uTL&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;a href=&quot;https://a.co/d/8ogyjPZ&quot;&gt;Book Link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This book gives a comprehensive view on building real world NLP applications. it covers the complete lifecycle of a typical NLP project - right from data collection to deploying and monitoring the model. Some of these steps are applicable to any ML pipeline while some are very specific to NLP. The book also introduces task-specific case studies and domain-specific guides to build an NLP system from scratch.&lt;/p&gt;
&lt;h3&gt;Topics&lt;/h3&gt;
&lt;p&gt;NLP: A Primer&lt;/p&gt;
&lt;p&gt;NLP Pipeline&lt;/p&gt;
&lt;p&gt;Text Representation&lt;/p&gt;
&lt;p&gt;Text Classification&lt;/p&gt;
&lt;p&gt;Information Extraction&lt;/p&gt;
&lt;p&gt;Chatbots&lt;/p&gt;
&lt;p&gt;Topics in Brief&lt;/p&gt;
&lt;p&gt;Social Media&lt;/p&gt;
&lt;p&gt;E-Commerce and Retail&lt;/p&gt;
&lt;p&gt;Healthcare, Finance, and Law&lt;/p&gt;
&lt;p&gt;The End-to-End NLP Process&lt;/p&gt;
&lt;h2&gt;Deep Learning from Scratch&lt;/h2&gt;
&lt;figure&gt;&lt;img alt=&quot;71vAAIa10YL&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 259px) 259px, 100vw&quot; width=&quot;259&quot; height=&quot;340&quot; src=&quot;https://briansunter.com/_astro/71vAAIa10YL_1670748325496_0.CXxY3_uq_Z22l1av.webp&quot; srcset=&quot;https://briansunter.com/_astro/71vAAIa10YL_1670748325496_0.CXxY3_uq_Z22l1av.webp 259w&quot; /&gt;&lt;figcaption&gt;71vAAIa10YL&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;a href=&quot;https://www.amazon.com/Deep-Learning-Scratch-Building-Principles/dp/1492041416&quot;&gt;Book Link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Shows you how neural networks work using a first principles approach. You’ll learn how to apply multilayer neural networks, convolutional neural networks, and recurrent neural networks from the ground up. With a thorough understanding of how neural networks work mathematically, computationally, and conceptually&lt;/p&gt;
&lt;h3&gt;Topics&lt;/h3&gt;
&lt;p&gt;Math Foundations&lt;/p&gt;
&lt;p&gt;Fundamentals&lt;/p&gt;
&lt;p&gt;Deep Learning from Scratch&lt;/p&gt;
&lt;p&gt;Extensions&lt;/p&gt;
&lt;p&gt;Convolutional Neural Networks&lt;/p&gt;
&lt;p&gt;Recurrent Neural Networks&lt;/p&gt;
&lt;p&gt;PyTorch&lt;/p&gt;
&lt;h2&gt;Generative Deep Learning by David Foster&lt;/h2&gt;
&lt;figure&gt;&lt;img alt=&quot;71fGFYhl9WL&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 259px) 259px, 100vw&quot; width=&quot;259&quot; height=&quot;340&quot; src=&quot;https://briansunter.com/_astro/71fGFYhl9WL_1670829940119_0.BoNIdqYF_Z25f7GR.webp&quot; srcset=&quot;https://briansunter.com/_astro/71fGFYhl9WL_1670829940119_0.BoNIdqYF_Z25f7GR.webp 259w&quot; /&gt;&lt;figcaption&gt;71fGFYhl9WL&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;a href=&quot;https://www.amazon.com/Generative-Deep-Learning-Teaching-Machines/dp/1492041947&quot;&gt;Book Link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Discover how to re-create some of the most impressive examples of generative deep learning models, such as variational autoencoders, generative adversarial networks (GANs), encoder-decoder models, and world models.&lt;/p&gt;
&lt;h3&gt;Topics&lt;/h3&gt;
&lt;p&gt;Generative Versus Discriminative Modeling&lt;/p&gt;
&lt;p&gt;Probabilistic Generative Models&lt;/p&gt;
&lt;p&gt;Deep Neural Networks&lt;/p&gt;
&lt;p&gt;Convolutional Layers&lt;/p&gt;
&lt;p&gt;Batch Normalization&lt;/p&gt;
&lt;p&gt;Dropout Layers&lt;/p&gt;
&lt;p&gt;Autoencoders&lt;/p&gt;
&lt;p&gt;Variational Autoencoder&lt;/p&gt;
&lt;p&gt;Using VAEs to Generate Faces&lt;/p&gt;
&lt;p&gt;Generative Adversarial Networks&lt;/p&gt;
&lt;p&gt;Oscillating Loss&lt;/p&gt;
&lt;p&gt;Mode Collapse&lt;/p&gt;
&lt;p&gt;Uninformative Loss&lt;/p&gt;
&lt;p&gt;Hyperparameters&lt;/p&gt;
&lt;p&gt;Discriminators&lt;/p&gt;
&lt;p&gt;Wasserstein GAN&lt;/p&gt;
&lt;p&gt;CycleGAN&lt;/p&gt;
&lt;p&gt;Neural Style Transfer&lt;/p&gt;
&lt;p&gt;LSTM Network&lt;/p&gt;
&lt;p&gt;Stacked Recurrent Networks&lt;/p&gt;
&lt;p&gt;Gated Recurrent Units&lt;/p&gt;
&lt;p&gt;Bidirectional Cells&lt;/p&gt;
&lt;p&gt;Encoder–Decoder Models&lt;/p&gt;
&lt;p&gt;Music-Generating RNN&lt;/p&gt;
&lt;p&gt;Reinforcement Learning&lt;/p&gt;
&lt;p&gt;MDN-RNN&lt;/p&gt;
&lt;p&gt;Controller Architecture&lt;/p&gt;
&lt;p&gt;In-Dream Training&lt;/p&gt;
&lt;p&gt;Transformer&lt;/p&gt;
&lt;p&gt;ProGAN&lt;/p&gt;
&lt;p&gt;Self-Attention GAN (SAGAN)&lt;/p&gt;
&lt;p&gt;BigGAN&lt;/p&gt;
&lt;p&gt;StyleGAN&lt;/p&gt;
&lt;h2&gt;Introducing MLOps&lt;/h2&gt;
&lt;figure&gt;&lt;img alt=&quot;mlops&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 250px) 250px, 100vw&quot; width=&quot;250&quot; height=&quot;328&quot; src=&quot;https://briansunter.com/_astro/mlops_1670830679583_0.DJV-KzpB_S9FaY.webp&quot; srcset=&quot;https://briansunter.com/_astro/mlops_1670830679583_0.DJV-KzpB_S9FaY.webp 250w&quot; /&gt;&lt;figcaption&gt;mlops&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;a href=&quot;https://www.amazon.com/Introducing-MLOps-Machine-Learning-Enterprise/dp/1492083291&quot;&gt;Book Link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Introduces the key concepts of MLOps to help data scientists and application engineers not only operationalize ML models to drive real business change but also maintain and improve those models over time. Through lessons based on numerous MLOps applications around the world, nine experts in machine learning provide insights into the five steps of the model life cycle—Build, Preproduction, Deployment, Monitoring, and Governance&lt;/p&gt;
&lt;h3&gt;Topics&lt;/h3&gt;
&lt;p&gt;People of MLOps&lt;/p&gt;
&lt;p&gt;Model Development&lt;/p&gt;
&lt;p&gt;Data Sources and Exploratory Data Analysis&lt;/p&gt;
&lt;p&gt;Feature Engineering and Selection&lt;/p&gt;
&lt;p&gt;Training and Evaluation&lt;/p&gt;
&lt;p&gt;Reproducibility&lt;/p&gt;
&lt;p&gt;Productionalization and Deployment&lt;/p&gt;
&lt;p&gt;Monitoring&lt;/p&gt;
&lt;p&gt;Iteration and Life Cycle&lt;/p&gt;
&lt;p&gt;Governance&lt;/p&gt;
&lt;p&gt;Evaluating and Comparing Models&lt;/p&gt;
&lt;p&gt;Adaptation from Development to Production Environments&lt;/p&gt;
&lt;p&gt;Quality Assurance for Machine Learning&lt;/p&gt;
&lt;p&gt;Reproducibility and Auditability&lt;/p&gt;
&lt;p&gt;Machine Learning Security&lt;/p&gt;
&lt;p&gt;Building ML Artifacts&lt;/p&gt;
&lt;p&gt;Scaling Deployments&lt;/p&gt;
&lt;p&gt;Model Degradation&lt;/p&gt;
&lt;p&gt;Drift Detection in Practice&lt;/p&gt;
&lt;p&gt;The Feedback Loop&lt;/p&gt;
&lt;p&gt;Model Governance&lt;/p&gt;
&lt;p&gt;Responsible AI&lt;/p&gt;
&lt;p&gt;MLOps in Practice&lt;/p&gt;
&lt;p&gt;Consumer Credit Risk Management&lt;/p&gt;
&lt;p&gt;Marketing Recommendation Engines&lt;/p&gt;
&lt;p&gt;Consumption Forecast&lt;/p&gt;
&lt;h2&gt;Introduction to Statistical Learning&lt;/h2&gt;
&lt;figure&gt;&lt;img alt=&quot;1071614177.01. SCLZZZZZZZ SX500&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 331px) 331px, 100vw&quot; width=&quot;331&quot; height=&quot;500&quot; src=&quot;https://briansunter.com/_astro/1071614177.01._SCLZZZZZZZ_SX500_1670647404075_0.Y1IkIAoN_1V17Cn.webp&quot; srcset=&quot;https://briansunter.com/_astro/1071614177.01._SCLZZZZZZZ_SX500_1670647404075_0.Y1IkIAoN_1V17Cn.webp 331w&quot; /&gt;&lt;figcaption&gt;1071614177.01. SCLZZZZZZZ SX500&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;a href=&quot;https://www.amazon.com/Introduction-Statistical-Learning-Applications-Statistics-dp-1071614177/dp/1071614177/ref=dp_ob_title_bk&quot;&gt;Book link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.statlearning.com/&quot;&gt;Site&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Accessible overview of the field of statistical learning, an essential toolset for making sense of the vast and complex data sets that have emerged in fields ranging from biology to finance to marketing to astrophysics in the past twenty years. This book presents some of the most important modeling and prediction techniques, along with relevant applications&lt;/p&gt;
&lt;p&gt;This book is targeted at statisticians and non-statisticians alike who wish to use cutting-edge statistical learning techniques to analyze their data. The text assumes only a previous course in linear regression and no knowledge of matrix algebra.&lt;/p&gt;
&lt;p&gt;Easier than &lt;strong&gt;Elements of Statistical Learning&lt;/strong&gt;&lt;/p&gt;
&lt;h3&gt;Topics&lt;/h3&gt;
&lt;p&gt;linear regression&lt;/p&gt;
&lt;p&gt;classification&lt;/p&gt;
&lt;p&gt;resampling methods&lt;/p&gt;
&lt;p&gt;shrinkage approaches&lt;/p&gt;
&lt;p&gt;tree-based methods&lt;/p&gt;
&lt;p&gt;support vector machines&lt;/p&gt;
&lt;p&gt;clustering&lt;/p&gt;
&lt;p&gt;deep learning&lt;/p&gt;
&lt;p&gt;survival analysis&lt;/p&gt;
&lt;p&gt;multiple testing&lt;/p&gt;
&lt;p&gt;naïve Bayes&lt;/p&gt;
&lt;p&gt;generalized linear models&lt;/p&gt;
&lt;p&gt;Bayesian additive regression trees&lt;/p&gt;
&lt;p&gt;matrix completion&lt;/p&gt;
&lt;h2&gt;UC Berkeley CS188 Intro to AI&lt;/h2&gt;
&lt;figure&gt;&lt;img alt=&quot;cs188 welcome&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 360px) 360px, 100vw&quot; width=&quot;360&quot; height=&quot;148&quot; src=&quot;https://briansunter.com/_astro/cs188_welcome_1671233486880_0.CuX2QCr__Z78JU1.webp&quot; srcset=&quot;https://briansunter.com/_astro/cs188_welcome_1671233486880_0.CuX2QCr__Z78JU1.webp 360w&quot; /&gt;&lt;figcaption&gt;cs188 welcome&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;This introductory Berkeley course accompanies the “Artificial Intelligence: A Modern Approach” book and provides lectures and course materials&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://web.archive.org/web/20250526124610/https://ai.berkeley.edu/course_schedule.html&quot;&gt;Course Link&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Topics&lt;/h3&gt;
&lt;p&gt;Uninformed Search&lt;/p&gt;
&lt;p&gt;A* Search and Heuristics&lt;/p&gt;
&lt;p&gt;Constraint Satisfaction Problems&lt;/p&gt;
&lt;p&gt;Game Trees&lt;/p&gt;
&lt;p&gt;Minimax&lt;/p&gt;
&lt;p&gt;Expectimax&lt;/p&gt;
&lt;p&gt;Markov Decision Processes&lt;/p&gt;
&lt;p&gt;Reinforcement Learning&lt;/p&gt;
&lt;p&gt;Probability&lt;/p&gt;
&lt;p&gt;Markov Models&lt;/p&gt;
&lt;p&gt;Hidden Markov Models&lt;/p&gt;
&lt;p&gt;Bayes’ Nets&lt;/p&gt;
&lt;p&gt;Decision Diagrams&lt;/p&gt;
&lt;p&gt;Naive Bayes&lt;/p&gt;
&lt;p&gt;Perceptrons&lt;/p&gt;
&lt;p&gt;Kernels and Clustering&lt;/p&gt;
&lt;p&gt;Advanced Applications: NLP, Games, Cars, Robotics, and Computer Vision&lt;/p&gt;
&lt;h2&gt;Artificial Intelligence: A Modern Approach&lt;/h2&gt;
&lt;figure&gt;&lt;img alt=&quot;513Hc42D83L&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 400px) 400px, 100vw&quot; width=&quot;400&quot; height=&quot;500&quot; src=&quot;https://briansunter.com/_astro/513Hc42D83L_1670836404894_0.CvoHma0w_1s3I50.webp&quot; srcset=&quot;https://briansunter.com/_astro/513Hc42D83L_1670836404894_0.CvoHma0w_1s3I50.webp 400w&quot; /&gt;&lt;figcaption&gt;513Hc42D83L&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;a href=&quot;https://www.amazon.com/Artificial-Intelligence-Modern-Approach-3rd/dp/0136042597&quot;&gt;Book Link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://aima.cs.berkeley.edu/&quot;&gt;Site Link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The de facto bible of artificial intelligence* It combines in-depth treatments of introductory and advanced concepts, along with historical background and accessible explanations. Including algorithms, code and pseudo-code, the book sits between master’s and PhD&lt;/p&gt;
&lt;p&gt;Focuses on machine learning, deep learning, probabilistic programming, multiagent systems, and includes sections where the AI’s utility function is uncertain, rather than certain.&lt;/p&gt;
&lt;h3&gt;Topics&lt;/h3&gt;
&lt;p&gt;Problem-solving&lt;/p&gt;
&lt;p&gt;Searching&lt;/p&gt;
&lt;p&gt;Adversarial Search and Games&lt;/p&gt;
&lt;p&gt;Constraint Satisfaction Problems&lt;/p&gt;
&lt;p&gt;Knowledge, reasoning, and planning&lt;/p&gt;
&lt;p&gt;Logical Agents&lt;/p&gt;
&lt;p&gt;First-Order Logic&lt;/p&gt;
&lt;p&gt;Knowledge Representation&lt;/p&gt;
&lt;p&gt;Automated Planning&lt;/p&gt;
&lt;p&gt;Uncertain knowledge and reasoning&lt;/p&gt;
&lt;p&gt;Probabilistic Reasoning&lt;/p&gt;
&lt;p&gt;Decision Making&lt;/p&gt;
&lt;p&gt;Machine Learning&lt;/p&gt;
&lt;p&gt;Learning from Example&lt;/p&gt;
&lt;p&gt;Learning Probabilistic Models&lt;/p&gt;
&lt;p&gt;Deep Learning&lt;/p&gt;
&lt;p&gt;Reinforcement Learning&lt;/p&gt;
&lt;p&gt;Communicating, perceiving, and acting&lt;/p&gt;
&lt;p&gt;Natural Language Processing&lt;/p&gt;
&lt;p&gt;Deep Learning for NLP&lt;/p&gt;
&lt;p&gt;Computer Vision&lt;/p&gt;
&lt;p&gt;Robotics&lt;/p&gt;
&lt;h2&gt;An Introduction to Probability and Inductive Logic&lt;/h2&gt;
&lt;figure&gt;&lt;img alt=&quot;0521775019.01. SCLZZZZZZZ SX500&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 350px) 350px, 100vw&quot; width=&quot;350&quot; height=&quot;500&quot; src=&quot;https://briansunter.com/_astro/0521775019.01._SCLZZZZZZZ_SX500_1671236538109_0.BkY138Hv_3rtky.webp&quot; srcset=&quot;https://briansunter.com/_astro/0521775019.01._SCLZZZZZZZ_SX500_1671236538109_0.BkY138Hv_3rtky.webp 350w&quot; /&gt;&lt;figcaption&gt;0521775019.01. SCLZZZZZZZ SX500&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;a href=&quot;https://www.amazon.com/dp/0521775019?tag=bsunter06-20&quot;&gt;Book Link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Book focused on probability and logic from a philosophical rather than mathematical perspective.&lt;/p&gt;
&lt;p&gt;The book has been designed to offer maximal accessibility to the widest range of students (not only those majoring in philosophy) and assumes no formal training in elementary symbolic logic. It offers a comprehensive course covering all basic definitions of induction and probability, and considers such topics as decision theory, Bayesianism, frequency ideas, and the philosophical problem of induction.&lt;/p&gt;
&lt;h2&gt;Probability for the Enthusiastic Beginner&lt;/h2&gt;
&lt;figure&gt;&lt;img alt=&quot;61WkWvYJ9BL&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 237px) 237px, 100vw&quot; width=&quot;237&quot; height=&quot;340&quot; src=&quot;https://briansunter.com/_astro/61WkWvYJ9BL_1670723759360_0.CjA4B_JA_Z1vw0Pa.webp&quot; srcset=&quot;https://briansunter.com/_astro/61WkWvYJ9BL_1670723759360_0.CjA4B_JA_Z1vw0Pa.webp 237w&quot; /&gt;&lt;figcaption&gt;61WkWvYJ9BL&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;This book is a resource for high school and college students learning about probability for the first time. It covers all of the standard introductory topics, such as combinatorics, the rules of probability, Bayes’ theorem, and expectation value, and includes 150 worked-out problems. Calculus is not required, although some problems involve it. It can be used as a main text or supplement in an introductory probability course.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.amazon.com/Probability-Enthusiastic-Beginner-David-Morin/dp/1523318678&quot;&gt;Book Link&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Topics&lt;/h3&gt;
&lt;p&gt;Combinatorics&lt;/p&gt;
&lt;p&gt;Bayes Theorem&lt;/p&gt;
&lt;p&gt;Stirling’s Formula.&lt;/p&gt;
&lt;p&gt;Expected values&lt;/p&gt;
&lt;p&gt;Variance&lt;/p&gt;
&lt;p&gt;Standard deviation&lt;/p&gt;
&lt;p&gt;Distributions&lt;/p&gt;
&lt;p&gt;Uniform&lt;/p&gt;
&lt;p&gt;Bernoulli&lt;/p&gt;
&lt;p&gt;Binomial&lt;/p&gt;
&lt;p&gt;Exponential&lt;/p&gt;
&lt;p&gt;Poisson&lt;/p&gt;
&lt;p&gt;Gaussian&lt;/p&gt;
&lt;p&gt;Gaussian approximations&lt;/p&gt;
&lt;p&gt;Law of large numbers&lt;/p&gt;
&lt;p&gt;Central limit theorem&lt;/p&gt;
&lt;p&gt;Correlation and regression&lt;/p&gt;
&lt;h2&gt;Elements of Statistical Learning&lt;/h2&gt;
&lt;figure&gt;&lt;img alt=&quot;CoverII small&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 250px) 250px, 100vw&quot; width=&quot;250&quot; height=&quot;378&quot; src=&quot;https://briansunter.com/_astro/CoverII_small_1670721320001_0.DnIRJecp_2bS2o4.webp&quot; srcset=&quot;https://briansunter.com/_astro/CoverII_small_1670721320001_0.DnIRJecp_2bS2o4.webp 250w&quot; /&gt;&lt;figcaption&gt;CoverII small&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;a href=&quot;https://hastie.su.domains/ElemStatLearn/&quot;&gt;Book Link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This book descibes the important ideas in areas such as data mining, machine learning, and bioinformatics in a common conceptual framework. While the approach is statistical, the emphasis is on concepts rather than mathematics. Many examples are given, with a liberal use of color graphics. It should be a valuable resource for statisticians and anyone interested in data mining in science or industry.&lt;/p&gt;
&lt;h3&gt;Topics&lt;/h3&gt;
&lt;p&gt;Overview of supervised learning&lt;/p&gt;
&lt;p&gt;Linear methods for regression&lt;/p&gt;
&lt;p&gt;Linear methods for classification&lt;/p&gt;
&lt;p&gt;Basis expansions and regularization&lt;/p&gt;
&lt;p&gt;Kernel smoothing methods&lt;/p&gt;
&lt;p&gt;Model assessment and selection&lt;/p&gt;
&lt;p&gt;Model inference and averaging&lt;/p&gt;
&lt;p&gt;Additive models, trees, and related methods&lt;/p&gt;
&lt;p&gt;Boosting and additive trees&lt;/p&gt;
&lt;p&gt;Neural networks&lt;/p&gt;
&lt;p&gt;Support vector machines and flexible discriminants&lt;/p&gt;
&lt;p&gt;Prototype methods and nearest-neighbors&lt;/p&gt;
&lt;p&gt;Unsupervised learning&lt;/p&gt;
&lt;p&gt;Random forests&lt;/p&gt;
&lt;p&gt;Ensemble learning&lt;/p&gt;
&lt;p&gt;Undirected graphical models&lt;/p&gt;
&lt;p&gt;High-dimensional problems&lt;/p&gt;
&lt;h2&gt;Statistical Rethinking: A Bayesian Course&lt;/h2&gt;
&lt;figure&gt;&lt;img alt=&quot;statistical-rethinking&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 332px) 332px, 100vw&quot; width=&quot;332&quot; height=&quot;500&quot; src=&quot;https://briansunter.com/_astro/statistical-rethinking_1671779794786_0.BroQWYkb_iNUYv.webp&quot; srcset=&quot;https://briansunter.com/_astro/statistical-rethinking_1671779794786_0.BroQWYkb_iNUYv.webp 332w&quot; /&gt;&lt;figcaption&gt;statistical-rethinking&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;a href=&quot;https://www.amazon.com/dp/1482253445?tag=bsunter06-20&quot;&gt;Book Link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A modern course focused on bayesian statistics, and includes a course&lt;/p&gt;
&lt;p&gt;The text presents generalized linear multilevel models from a Bayesian perspective, relying on a simple logical interpretation of Bayesian probability and maximum entropy. It covers from the basics of regression to multilevel models. The author also discusses measurement error, missing data, and Gaussian process models for spatial and network autocorrelation.&lt;/p&gt;
&lt;h3&gt;Topics&lt;/h3&gt;
&lt;p&gt;Sampling&lt;/p&gt;
&lt;p&gt;Linear models&lt;/p&gt;
&lt;p&gt;Multivariate linear models&lt;/p&gt;
&lt;p&gt;Overfitting, regularization, and information criteria&lt;/p&gt;
&lt;p&gt;Interactions&lt;/p&gt;
&lt;p&gt;Markov chain Monte Carlo&lt;/p&gt;
&lt;p&gt;Big entropy and the generalized linear model&lt;/p&gt;
&lt;p&gt;Counting and classification&lt;/p&gt;
&lt;p&gt;Multilevel models&lt;/p&gt;
&lt;p&gt;covariance&lt;/p&gt;
&lt;p&gt;Missing data&lt;/p&gt;
&lt;h2&gt;Pattern Recognition and Machine Learning&lt;/h2&gt;
&lt;figure&gt;&lt;img alt=&quot;61ECBlvkBCL. AC SY780&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 370px) 370px, 100vw&quot; width=&quot;370&quot; height=&quot;500&quot; src=&quot;https://briansunter.com/_astro/61ECBlvkBCL._AC_SY780_1670831683801_0.BoFhkWMr_15Wzgo.webp&quot; srcset=&quot;https://briansunter.com/_astro/61ECBlvkBCL._AC_SY780_1670831683801_0.BoFhkWMr_15Wzgo.webp 370w&quot; /&gt;&lt;figcaption&gt;61ECBlvkBCL. AC SY780&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;a href=&quot;https://www.microsoft.com/en-us/research/publication/pattern-recognition-machine-learning/&quot;&gt;Book Link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A comprehensive textbook by Christopher Bishop covering the field of pattern recognition and machine learning using a Bayesian perspective.&lt;/p&gt;
&lt;h3&gt;Topics&lt;/h3&gt;
&lt;p&gt;Probability Theory&lt;/p&gt;
&lt;p&gt;Model Selection&lt;/p&gt;
&lt;p&gt;The Curse of Dimensionality&lt;/p&gt;
&lt;p&gt;Decision Theory&lt;/p&gt;
&lt;p&gt;Information Theory&lt;/p&gt;
&lt;p&gt;Probability Distributions&lt;/p&gt;
&lt;p&gt;The Gaussian Distribution&lt;/p&gt;
&lt;p&gt;Exponential Family&lt;/p&gt;
&lt;p&gt;Nonparametric Methods&lt;/p&gt;
&lt;p&gt;Linear Models for Regression&lt;/p&gt;
&lt;p&gt;Linear Basis Function Models&lt;/p&gt;
&lt;p&gt;Bayesian Linear Regression&lt;/p&gt;
&lt;p&gt;Linear Models for Classification&lt;/p&gt;
&lt;p&gt;Discriminant Functions&lt;/p&gt;
&lt;p&gt;Probabilistic Generative Models&lt;/p&gt;
&lt;p&gt;Probabilistic Discriminative Models&lt;/p&gt;
&lt;p&gt;The Laplace Approximation&lt;/p&gt;
&lt;p&gt;Neural Network&lt;/p&gt;
&lt;p&gt;Feed-forward Network Functions&lt;/p&gt;
&lt;p&gt;Network Training&lt;/p&gt;
&lt;p&gt;Error Backpropagation&lt;/p&gt;
&lt;p&gt;Hessian Matrix&lt;/p&gt;
&lt;p&gt;Mixture Density Networks&lt;/p&gt;
&lt;p&gt;Bayesian Neural Networks&lt;/p&gt;
&lt;p&gt;Kernel Methods&lt;/p&gt;
&lt;p&gt;Gaussian Processes&lt;/p&gt;
&lt;p&gt;Sparse Kernel Machines&lt;/p&gt;
&lt;p&gt;Maximum Margin Classifiers&lt;/p&gt;
&lt;p&gt;Relevance Vector Machines&lt;/p&gt;
&lt;p&gt;Graphical Models&lt;/p&gt;
&lt;p&gt;Conditional Independence&lt;/p&gt;
&lt;p&gt;Markov Random Fields&lt;/p&gt;
&lt;p&gt;Inference in Graphical Models&lt;/p&gt;
&lt;p&gt;Mixture Models and EM&lt;/p&gt;
&lt;p&gt;K-means Clustering&lt;/p&gt;
&lt;p&gt;Mixtures of Gaussians&lt;/p&gt;
&lt;p&gt;Approximate Inference&lt;/p&gt;
&lt;p&gt;Variational Inference&lt;/p&gt;
&lt;p&gt;Variational Linear Regression&lt;/p&gt;
&lt;p&gt;Sampling Methods&lt;/p&gt;
&lt;p&gt;Basic Sampling Algorithms&lt;/p&gt;
&lt;p&gt;Markov Chain Monte Carlo&lt;/p&gt;
&lt;p&gt;Hybrid Monte Carlo Algorithm&lt;/p&gt;
&lt;p&gt;Continuous Latent Variables&lt;/p&gt;
&lt;p&gt;Principal Component Analysis&lt;/p&gt;
&lt;p&gt;Probabilistic PCA&lt;/p&gt;
&lt;p&gt;Kernel PCA&lt;/p&gt;
&lt;p&gt;Nonlinear Latent Variable Models&lt;/p&gt;
&lt;p&gt;Sequential Data&lt;/p&gt;
&lt;p&gt;Markov Models&lt;/p&gt;
&lt;p&gt;Hidden Markov Models&lt;/p&gt;
&lt;p&gt;Linear Dynamical Systems&lt;/p&gt;
&lt;p&gt;Combining Models&lt;/p&gt;
&lt;p&gt;Bayesian Model Averaging&lt;/p&gt;
&lt;p&gt;Committees&lt;/p&gt;
&lt;p&gt;Boosting&lt;/p&gt;
&lt;p&gt;Tree-based Models&lt;/p&gt;
&lt;p&gt;Conditional Mixture Models&lt;/p&gt;
&lt;h2&gt;Deep Learning Goodfellow Book&lt;/h2&gt;
&lt;figure&gt;&lt;img alt=&quot;61qbj4KwauL. SX258 BO1,204,203,200&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 260px) 260px, 100vw&quot; width=&quot;260&quot; height=&quot;341&quot; src=&quot;https://briansunter.com/_astro/61qbj4KwauL._SX258_BO1_204_203_200_1670749190031_0.DAOiYl5l_Z1tTgBk.webp&quot; srcset=&quot;https://briansunter.com/_astro/61qbj4KwauL._SX258_BO1_204_203_200_1670749190031_0.DAOiYl5l_Z1tTgBk.webp 260w&quot; /&gt;&lt;figcaption&gt;61qbj4KwauL. SX258 BO1,204,203,200&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The text offers mathematical and conceptual background, covering relevant concepts in linear algebra, probability theory and information theory, numerical computation, and machine learning. It describes deep learning techniques used by practitioners in industry, including deep feedforward networks, regularization, optimization algorithms, convolutional networks, sequence modeling, and practical methodology&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.deeplearningbook.org/&quot;&gt;Book Link&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Topics&lt;/h3&gt;
&lt;p&gt;Linear Algebra&lt;/p&gt;
&lt;p&gt;Probability and Information Theory&lt;/p&gt;
&lt;p&gt;Numerical Computation&lt;/p&gt;
&lt;p&gt;Deep Feedforward Networks&lt;/p&gt;
&lt;p&gt;Regularization for Deep Learning&lt;/p&gt;
&lt;p&gt;Optimization for Training Deep Models
Gradient Descent and Structure of Neural Network Cost Functions&lt;/p&gt;
&lt;p&gt;Tutorial on Optimization for Deep Networks&lt;/p&gt;
&lt;p&gt;Batch Normalization&lt;/p&gt;
&lt;p&gt;Convolutional Networks&lt;/p&gt;
&lt;p&gt;Sequence Modeling: Recurrent and Recursive Networks&lt;/p&gt;
&lt;p&gt;Linear Factors&lt;/p&gt;
&lt;p&gt;Autoencoders&lt;/p&gt;
&lt;p&gt;Representation Learning&lt;/p&gt;
&lt;p&gt;Structured Probabilistic Models for Deep Learning&lt;/p&gt;
&lt;p&gt;Monte Carlo Methods&lt;/p&gt;
&lt;p&gt;Confronting the Partition Function&lt;/p&gt;
&lt;h2&gt;Reinforcement Learning: An Introduction&lt;/h2&gt;
&lt;figure&gt;&lt;img alt=&quot;reinforcementlearning&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 363px) 363px, 100vw&quot; width=&quot;363&quot; height=&quot;499&quot; src=&quot;https://briansunter.com/_astro/reinforcementlearning_1670834056055_0.qtHFE2Tq_2cLMLb.webp&quot; srcset=&quot;https://briansunter.com/_astro/reinforcementlearning_1670834056055_0.qtHFE2Tq_2cLMLb.webp 363w&quot; /&gt;&lt;figcaption&gt;reinforcementlearning&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;a href=&quot;https://www.amazon.com/Reinforcement-Learning-Introduction-Adaptive-Computation/dp/0262039249/ref=dp_ob_title_bk&quot;&gt;Book Link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://incompleteideas.net/book/the-book-2nd.html&quot;&gt;Site Link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Part I covers as much of reinforcement learning as possible without going beyond the tabular case for which exact solutions can be found including UCB, Expected Sarsa, and Double Learning.&lt;/p&gt;
&lt;p&gt;Part II extends these ideas to function approximation, such as artificial neural networks and the Fourier basis, and offers expanded treatment of off-policy learning and policy-gradient methods.&lt;/p&gt;
&lt;p&gt;Part III has new chapters on reinforcement learning’s relationships to psychology and neuroscience, as well as an updated case-studies chapter including AlphaGo and AlphaGo Zero, Atari game playing, and IBM Watson’s wagering strategy.&lt;/p&gt;
&lt;p&gt;The final chapter discusses the future societal impacts of reinforcement learning.&lt;/p&gt;
&lt;h3&gt;Topics&lt;/h3&gt;
&lt;p&gt;Tabular Solution Methods&lt;/p&gt;
&lt;p&gt;Multi-arm Bandits&lt;/p&gt;
&lt;p&gt;Finite Markov Decision Processes&lt;/p&gt;
&lt;p&gt;Dynamic Programming&lt;/p&gt;
&lt;p&gt;Monte Carlo Methods&lt;/p&gt;
&lt;p&gt;Temporal-Difference Learning&lt;/p&gt;
&lt;p&gt;Eligibility Traces&lt;/p&gt;
&lt;p&gt;Planning and Learning with Tabular Methods&lt;/p&gt;
&lt;p&gt;Approximate Solution Methods&lt;/p&gt;
&lt;p&gt;On-policy Approximation of Action Values&lt;/p&gt;
&lt;p&gt;Off-policy Approximation of Action Values&lt;/p&gt;
&lt;p&gt;Policy Approximation&lt;/p&gt;
&lt;p&gt;Psychology&lt;/p&gt;
&lt;p&gt;Neuroscience&lt;/p&gt;
&lt;p&gt;Applications and case studies&lt;/p&gt;
&lt;h2&gt;Papers&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://arxiv.org/abs/1412.6980&quot;&gt;Adam: A Method for Stochastic Optimization&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://arxiv.org/abs/1502.03167&quot;&gt;Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://arxiv.org/abs/1506.01497&quot;&gt;Faster R-CNN: towards real-time object detection with region proposal networks&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://arxiv.org/abs/1409.0473&quot;&gt;Neural Machine Translation by Jointly Learning to Align and Translate&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.nature.com/articles/nature14236&quot;&gt;Human-level control through deep reinforcement learning&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.nature.com/articles/nature16961&quot;&gt;Mastering the game of Go with deep neural networks and tree search&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://arxiv.org/abs/1511.06434&quot;&gt;Unsupervised Representation Learning with Deep Convolutional Generative Adversarial Networks&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://arxiv.org/abs/1609.02907&quot;&gt;Semi-Supervised Classification with Graph Convolutional Networks&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://arxiv.org/abs/1412.6572&quot;&gt;Explaining and Harnessing Adversarial Examples&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://proceedings.neurips.cc/paper/2012/file/c399862d3b9d6b76c8436e924a68c45b-Paper.pdf&quot;&gt;ImageNet Classification with Deep Convolutional Neural Networks(alexnet)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://arxiv.org/abs/1512.03385v1&quot;&gt;Deep Residual Learning for Image Recognition (resnet)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://arxiv.org/abs/1706.03762&quot;&gt;Attention Is All You Need (Transformers)&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Mike Jordan Book list&lt;/h3&gt;
&lt;p&gt;Extremely rigorous books recommend by Mike Jordan from Berkeley intended for those focused on research. I will probably never read these and feels impossible to get through these in one lifetime.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://news.ycombinator.com/item?id=1055389&quot;&gt;Hackernews Comment&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Esentially all of the material in the following intermediate-level statistics book:&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;1.) Casella, G. and Berger, R.L. (2001). “Statistical Inference” Duxbury Press.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;For a slightly more advanced book that’s quite clear on mathematical techniques, the following book is quite good:&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;2.) Ferguson, T. (1996). “A Course in Large Sample Theory” Chapman &amp;amp; Hall/CRC.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;You’ll need to learn something about asymptotics at some point, and a good starting place is:&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;3.) Lehmann, E. (2004). “Elements of Large-Sample Theory” Springer.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Those are all frequentist books. You should also read something Bayesian:&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;4.) Gelman, A. et al. (2003). “Bayesian Data Analysis” Chapman &amp;amp; Hall/CRC.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;you should start to read about Bayesian computation:&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;5.) Robert, C. and Casella, G. (2005). “Monte Carlo Statistical Methods” Springer.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;On the probability front, a good intermediate text is:&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;6.) Grimmett, G. and Stirzaker, D. (2001). “Probability and Random Processes” Oxford.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;At a more advanced level, a very good text is the following:&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;7.) Pollard, D. (2001). “A User’s Guide to Measure Theoretic Probability” Cambridge.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The standard advanced textbook is Durrett, R. (2005). “Probability: Theory and Examples” Duxbury.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Machine learning research also reposes on optimization theory. A good starting book on linear optimization that will prepare you for convex optimization:&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;8.) Bertsimas, D. and Tsitsiklis, J. (1997). “Introduction to Linear Optimization” Athena.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;And then you can graduate to:&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;9.) Boyd, S. and Vandenberghe, L. (2004). “Convex Optimization” Cambridge.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Getting a full understanding of algorithmic linear algebra is also important. At some point you should feel familiar with most of the material in&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;10.) Golub, G., and Van Loan, C. (1996). “Matrix Computations” Johns Hopkins.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;It’s good to know some information theory. The classic is:&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;11.) Cover, T. and Thomas, J. “Elements of Information Theory” Wiley.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Finally, if you want to start to learn some more abstract math, you might want to start to learn some functional analysis (if you haven’t already). Functional analysis is essentially linear algebra in infinite dimensions, and it’s necessary for kernel methods, for nonparametric Bayesian methods, and for various other topics. Here’s a book that I find very readable:&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;12.) Kreyszig, E. (1989). “Introductory Functional Analysis with Applications” Wiley.&lt;/p&gt;
&lt;h2&gt;Other&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://www.amazon.com/Superintelligence-Dangers-Strategies-Nick-Bostrom-ebook/dp/B00LOOCGB2/ref=tmm_kin_swatch_0?_encoding=UTF8&amp;amp;qid=&amp;amp;sr=&quot;&gt;Superintelligence&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://cs231n.stanford.edu/2016/&quot;&gt;Karpathy’s CS231n: Convolutional Neural Networks for Visual Recognition&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.amazon.com/First-Course-Probability-9th/dp/032179477X&quot;&gt;A First Course in Probability&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://web4.cs.ucl.ac.uk/staff/D.Barber/pmwiki/pmwiki.php?n=Brml.HomePage&quot;&gt;Bayesian Reasoning and Machine Learning&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://d2l.ai/&quot;&gt;Dive into Deep Learning&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.amazon.com/Principles-Mathematical-Analysis-International-Mathematics/dp/007054235X&quot;&gt;Principles of Mathematical Analysis by Walter Rudin&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.amazon.com/Probability-Random-Processes-Geoffrey-Grimmett/dp/0198572220&quot;&gt;Probability and Random Processes&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.amazon.com/Statistical-Inference-George-Casella/dp/0534243126&quot;&gt;Statistical Inference&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://greenteapress.com/thinkstats/&quot;&gt;Think Stats&lt;/a&gt;&lt;/p&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Data Structures and Algorithms Guide</title><link>https://briansunter.com/data-structures-algorithms-guide</link><guid isPermaLink="true">https://briansunter.com/data-structures-algorithms-guide</guid><description>Common data structures and the problems they solve.</description><pubDate>Sat, 26 Nov 2022 00:00:00 GMT</pubDate><content:encoded>&lt;h2&gt;Array&lt;/h2&gt;
&lt;h3&gt;Concepts&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;2D arrays&lt;/li&gt;
&lt;li&gt;N-dimensional arrays&lt;/li&gt;
&lt;li&gt;Jagged arrays&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Problems&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Two sum&lt;/li&gt;
&lt;li&gt;Search insert position&lt;/li&gt;
&lt;li&gt;Kth largest element in array&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Linked List&lt;/h2&gt;
&lt;h3&gt;Operations&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Insert&lt;/li&gt;
&lt;li&gt;Delete&lt;/li&gt;
&lt;li&gt;Find&lt;/li&gt;
&lt;li&gt;Reverse&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Problems&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Counting nodes&lt;/li&gt;
&lt;li&gt;Finding middle element&lt;/li&gt;
&lt;li&gt;Merging lists&lt;/li&gt;
&lt;li&gt;Kth to last node&lt;/li&gt;
&lt;li&gt;Detecting cycles&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Stack&lt;/h2&gt;
&lt;p&gt;LIFO (Last In, First Out)&lt;/p&gt;
&lt;h3&gt;Problems&lt;/h3&gt;
&lt;p&gt;Towers of Hanoi&lt;/p&gt;
&lt;h2&gt;Queue&lt;/h2&gt;
&lt;p&gt;FIFO (First In, First Out)&lt;/p&gt;
&lt;h2&gt;Tree&lt;/h2&gt;
&lt;h3&gt;Concepts&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Root&lt;/li&gt;
&lt;li&gt;Edge&lt;/li&gt;
&lt;li&gt;Leaf&lt;/li&gt;
&lt;li&gt;Depth&lt;/li&gt;
&lt;li&gt;Height&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Binary Tree&lt;/h3&gt;
&lt;h4&gt;Binary Search Trees&lt;/h4&gt;
&lt;h5&gt;Problems&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;Level order traversal&lt;/li&gt;
&lt;li&gt;Construct tree from traversal&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Balanced Trees&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;AVL Tree&lt;/li&gt;
&lt;li&gt;B-tree&lt;/li&gt;
&lt;li&gt;Red-Black Tree&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Operations&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Insertion&lt;/li&gt;
&lt;li&gt;Deletion&lt;/li&gt;
&lt;li&gt;Traversal (pre-order, in-order, post-order)&lt;/li&gt;
&lt;li&gt;Search (BFS, DFS)&lt;/li&gt;
&lt;li&gt;Find min/max&lt;/li&gt;
&lt;li&gt;Find successor/predecessor&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Hash Table&lt;/h2&gt;
&lt;h3&gt;Implementations&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Array&lt;/li&gt;
&lt;li&gt;Linked List&lt;/li&gt;
&lt;li&gt;Binary Tree&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Operations&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Get&lt;/li&gt;
&lt;li&gt;Put&lt;/li&gt;
&lt;li&gt;Delete&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Concepts&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Hash function&lt;/li&gt;
&lt;li&gt;Linear probing&lt;/li&gt;
&lt;li&gt;Quadratic probing&lt;/li&gt;
&lt;li&gt;Collision resolution&lt;/li&gt;
&lt;li&gt;Load factor&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Problems&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;LRU cache&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Heap&lt;/h2&gt;
&lt;h3&gt;Concepts&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Complete binary tree&lt;/li&gt;
&lt;li&gt;Priority queue&lt;/li&gt;
&lt;li&gt;Array representation&lt;/li&gt;
&lt;li&gt;Min heap&lt;/li&gt;
&lt;li&gt;Max heap&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Priority Queue Operations&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Enqueue&lt;/li&gt;
&lt;li&gt;Dequeue&lt;/li&gt;
&lt;li&gt;Peek&lt;/li&gt;
&lt;li&gt;Compare function&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Heap Operations&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Build&lt;/li&gt;
&lt;li&gt;Insert&lt;/li&gt;
&lt;li&gt;Get&lt;/li&gt;
&lt;li&gt;Delete&lt;/li&gt;
&lt;li&gt;Heapify&lt;/li&gt;
&lt;li&gt;Heap sort (in-place)&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Problems&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Merge k sorted lists&lt;/li&gt;
&lt;li&gt;Kth largest element in array&lt;/li&gt;
&lt;li&gt;The skyline problem&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Trie&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Compressed trie&lt;/li&gt;
&lt;li&gt;Suffix trie&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Advanced Data Structures&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Skip list&lt;/li&gt;
&lt;li&gt;Suffix tree&lt;/li&gt;
&lt;li&gt;Suffix array&lt;/li&gt;
&lt;li&gt;Bloom filter&lt;/li&gt;
&lt;li&gt;Segment tree&lt;/li&gt;
&lt;li&gt;Fenwick tree (Binary Indexed Tree)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Sorting&lt;/h2&gt;
&lt;h3&gt;Algorithms&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Bubble sort&lt;/li&gt;
&lt;li&gt;Insertion sort&lt;/li&gt;
&lt;li&gt;Selection sort&lt;/li&gt;
&lt;li&gt;Merge sort&lt;/li&gt;
&lt;li&gt;Quick sort&lt;/li&gt;
&lt;li&gt;Heap sort&lt;/li&gt;
&lt;li&gt;Radix sort&lt;/li&gt;
&lt;li&gt;Counting sort&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Concepts&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Sort stability&lt;/li&gt;
&lt;li&gt;In-place sorting&lt;/li&gt;
&lt;li&gt;Comparison vs non-comparison sorts&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Problems&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Dutch national flag&lt;/li&gt;
&lt;li&gt;Merge two sorted arrays&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Graph&lt;/h2&gt;
&lt;h3&gt;Concepts&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Graph theory&lt;/li&gt;
&lt;li&gt;Directed vs undirected graphs&lt;/li&gt;
&lt;li&gt;Weighted vs unweighted graphs&lt;/li&gt;
&lt;li&gt;Pathfinding&lt;/li&gt;
&lt;li&gt;Connectivity&lt;/li&gt;
&lt;li&gt;Shortest path&lt;/li&gt;
&lt;li&gt;Minimum spanning tree&lt;/li&gt;
&lt;li&gt;Cycles&lt;/li&gt;
&lt;li&gt;Disjoint graphs&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Traversal&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Breadth First Search (BFS)&lt;/li&gt;
&lt;li&gt;Depth First Search (DFS)&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Algorithms&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Bipartite graph detection&lt;/li&gt;
&lt;li&gt;Topological sort&lt;/li&gt;
&lt;li&gt;Dijkstra’s algorithm&lt;/li&gt;
&lt;li&gt;Bellman-Ford algorithm&lt;/li&gt;
&lt;li&gt;Floyd-Warshall algorithm&lt;/li&gt;
&lt;li&gt;Prim’s algorithm&lt;/li&gt;
&lt;li&gt;Kruskal’s algorithm&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Representations&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Adjacency list&lt;/li&gt;
&lt;li&gt;Adjacency matrix&lt;/li&gt;
&lt;li&gt;Edge list&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Recursion&lt;/h2&gt;
&lt;h3&gt;Concepts&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Base case&lt;/li&gt;
&lt;li&gt;Recursive case&lt;/li&gt;
&lt;li&gt;Inductive step&lt;/li&gt;
&lt;li&gt;Tail recursion&lt;/li&gt;
&lt;li&gt;Memoization&lt;/li&gt;
&lt;li&gt;Backtracking&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Problems&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Recursive factorial&lt;/li&gt;
&lt;li&gt;Recursive exponent&lt;/li&gt;
&lt;li&gt;Fibonacci numbers&lt;/li&gt;
&lt;li&gt;Pascal’s triangle&lt;/li&gt;
&lt;li&gt;Towers of Hanoi&lt;/li&gt;
&lt;li&gt;Subsets of size n&lt;/li&gt;
&lt;li&gt;Letter case permutations&lt;/li&gt;
&lt;li&gt;Subsets&lt;/li&gt;
&lt;li&gt;Permutations&lt;/li&gt;
&lt;li&gt;Subset sum&lt;/li&gt;
&lt;li&gt;Generate parentheses&lt;/li&gt;
&lt;li&gt;N-Queens&lt;/li&gt;
&lt;li&gt;Subarray sum equals k&lt;/li&gt;
&lt;li&gt;Valid parentheses&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;String Algorithms&lt;/h2&gt;
&lt;h3&gt;Concepts&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;String matching&lt;/li&gt;
&lt;li&gt;Pattern matching&lt;/li&gt;
&lt;li&gt;String search&lt;/li&gt;
&lt;li&gt;Data compression&lt;/li&gt;
&lt;li&gt;Edit distance&lt;/li&gt;
&lt;li&gt;Substring search&lt;/li&gt;
&lt;li&gt;String similarity measures&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Algorithms&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Rabin-Karp&lt;/li&gt;
&lt;li&gt;KMP (Knuth-Morris-Pratt)&lt;/li&gt;
&lt;li&gt;Boyer-Moore&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Problems&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;First non-repeating character&lt;/li&gt;
&lt;li&gt;Anagram detection&lt;/li&gt;
&lt;li&gt;Palindrome check&lt;/li&gt;
&lt;li&gt;Character frequency counting&lt;/li&gt;
&lt;li&gt;Reverse string&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Dynamic Programming&lt;/h2&gt;
&lt;h3&gt;Concepts&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Optimal substructure&lt;/li&gt;
&lt;li&gt;Overlapping subproblems&lt;/li&gt;
&lt;li&gt;Memoization (top-down)&lt;/li&gt;
&lt;li&gt;Tabulation (bottom-up)&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Problems&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;0/1 Knapsack&lt;/li&gt;
&lt;li&gt;Longest common subsequence&lt;/li&gt;
&lt;li&gt;Subset sum&lt;/li&gt;
&lt;li&gt;Minimum edit distance&lt;/li&gt;
&lt;li&gt;Minimum number of coins&lt;/li&gt;
&lt;li&gt;Longest increasing subsequence&lt;/li&gt;
&lt;li&gt;Longest palindromic subsequence&lt;/li&gt;
&lt;li&gt;Text justification&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Computational Geometry&lt;/h2&gt;
&lt;h2&gt;Network Flow Algorithms&lt;/h2&gt;
&lt;h3&gt;Concepts&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Network flow&lt;/li&gt;
&lt;li&gt;Maximum flow&lt;/li&gt;
&lt;li&gt;Minimum cut&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Algorithms&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Ford-Fulkerson&lt;/li&gt;
&lt;li&gt;Edmonds-Karp&lt;/li&gt;
&lt;li&gt;Dinic’s algorithm&lt;/li&gt;
&lt;li&gt;König’s theorem&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;NP-Complete&lt;/h2&gt;
&lt;h3&gt;Approximation Algorithms&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Simulated annealing&lt;/li&gt;
&lt;li&gt;Tabu search&lt;/li&gt;
&lt;li&gt;Genetic algorithms&lt;/li&gt;
&lt;li&gt;Ant colony optimization&lt;/li&gt;
&lt;li&gt;Particle swarm optimization&lt;/li&gt;
&lt;li&gt;Cross-entropy method&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Examples of NP-Complete Problems&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Set cover&lt;/li&gt;
&lt;li&gt;Knapsack&lt;/li&gt;
&lt;li&gt;Bin packing&lt;/li&gt;
&lt;li&gt;Vertex cover&lt;/li&gt;
&lt;li&gt;Hamiltonian path&lt;/li&gt;
&lt;li&gt;Traveling salesman&lt;/li&gt;
&lt;li&gt;Boolean satisfiability (SAT)&lt;/li&gt;
&lt;li&gt;Partition problem&lt;/li&gt;
&lt;li&gt;Clique problem&lt;/li&gt;
&lt;li&gt;Graph coloring&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Search&lt;/h2&gt;
&lt;h3&gt;Basic Search&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Linear search&lt;/li&gt;
&lt;li&gt;Binary search&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Graph Search&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Depth-first search (DFS)&lt;/li&gt;
&lt;li&gt;Breadth-first search (BFS)&lt;/li&gt;
&lt;li&gt;Best-first search&lt;/li&gt;
&lt;li&gt;A* search&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Shortest Path&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Dijkstra’s algorithm&lt;/li&gt;
&lt;li&gt;Bellman-Ford algorithm&lt;/li&gt;
&lt;li&gt;Floyd-Warshall algorithm&lt;/li&gt;
&lt;li&gt;Johnson’s algorithm&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Algorithm Design&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Greedy algorithms&lt;/li&gt;
&lt;li&gt;Dynamic programming&lt;/li&gt;
&lt;li&gt;Divide and conquer&lt;/li&gt;
&lt;li&gt;Decrease and conquer&lt;/li&gt;
&lt;li&gt;Transform and conquer&lt;/li&gt;
&lt;li&gt;Randomized algorithms&lt;/li&gt;
&lt;li&gt;Brute force&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Algorithm Analysis&lt;/h2&gt;
&lt;h3&gt;Time Complexity&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Big-O notation (upper bound)&lt;/li&gt;
&lt;li&gt;Omega notation (lower bound)&lt;/li&gt;
&lt;li&gt;Theta notation (tight bound)&lt;/li&gt;
&lt;li&gt;Little-o notation&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Space Complexity&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Auxiliary space&lt;/li&gt;
&lt;li&gt;In-place algorithms&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Mathematical Series&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Arithmetic series&lt;/li&gt;
&lt;li&gt;Geometric series&lt;/li&gt;
&lt;li&gt;Harmonic series&lt;/li&gt;
&lt;li&gt;Arithmetic-geometric series&lt;/li&gt;
&lt;/ul&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Newsletter Issue 9</title><link>https://briansunter.com/newsletter/issue-9</link><guid isPermaLink="true">https://briansunter.com/newsletter/issue-9</guid><description>New features for the logseq openai plugin and my thoughts on why Large Language Models are interesting</description><pubDate>Sat, 26 Nov 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/stop_1672218528540_0.Dr87jlJy_Z2hnnpK.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;h2&gt;Summary&lt;/h2&gt;
&lt;p&gt;I’m continuing to add features to the &lt;a href=&quot;https://github.com/briansunter/logseq-plugin-gpt3-openai&quot;&gt;Logseq GPT-3 OpenAI plugin&lt;/a&gt;, my plugin that allows you to perform AI text generation tasks in the Logseq note-taking application.&lt;/p&gt;
&lt;p&gt;I’m really interested in this new AI technology called “Large Language Models” which allows AI to understand the meaning behind text, as well as generate humanlike text.&lt;/p&gt;
&lt;h2&gt;Logseq GPT-3 OpenAI plugin&lt;/h2&gt;
&lt;p&gt;I recently added some new features to the logseq OpenAI GPT-3 plugin.&lt;/p&gt;
&lt;h4&gt;Logseq OpenAI Plugin Video&lt;/h4&gt;
&lt;p&gt;The &lt;a href=&quot;https://www.youtube.com/@ShuOmi_Official&quot;&gt;productivity Youtuber Shu Omi&lt;/a&gt; made a great video about my &lt;a href=&quot;https://github.com/briansunter/logseq-plugin-gpt3-openai&quot;&gt;Logseq OpenAI plugin&lt;/a&gt;. I recommend checking it out as an introduction to the plugin and AI-assisted note-taking.&lt;/p&gt;
&lt;p&gt;I’ve been a fan of Shu’s videos for a long time while learning about notetaking, and I am delighted he highlighted my plugin in one of his videos!&lt;/p&gt;
&lt;iframe width=&quot;100%&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/1R1Pq_41wFw&quot; frameborder=&quot;0&quot; loading=&quot;lazy&quot; allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen&gt;&lt;/iframe&gt;
&lt;h4&gt;GPT-3 Page&lt;/h4&gt;
&lt;p&gt;The new &lt;code&gt;gpt-page&lt;/code&gt; feature sends the entire current page to GPT-3, which should be more convenient for certain use cases where additional context is needed to make the suggestions more accurate. This feature makes it behave more like the OpenAI playground.&lt;/p&gt;

  &lt;div class=&quot;not-prose tweet-embed&quot;&gt;
    &lt;div class=&quot;tweet-card&quot;&gt;
      &lt;a href=&quot;https://twitter.com/Bsunter/status/1587513598896525312&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;&lt;/a&gt;
      &lt;div class=&quot;tweet-header&quot;&gt;
        &lt;div class=&quot;tweet-author&quot;&gt;
          &lt;img src=&quot;https://pbs.twimg.com/profile_images/507230915458646016/POGcr0En_normal.jpeg&quot; alt=&quot;Brian Sunter&apos;s avatar&quot; /&gt;
          &lt;div class=&quot;tweet-author-info&quot;&gt;
            &lt;a href=&quot;https://twitter.com/Bsunter/status/1587513598896525312&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
              &lt;div class=&quot;tweet-author-name-row&quot;&gt;
                &lt;span class=&quot;tweet-author-name&quot;&gt;Brian Sunter&lt;/span&gt;
                

  


              &lt;/div&gt;
            &lt;/a&gt;
            &lt;span class=&quot;tweet-author-handle&quot;&gt;@Bsunter&lt;/span&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;a href=&quot;https://twitter.com/Bsunter/status/1587513598896525312&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;

  
    
  

&lt;/a&gt;
      &lt;/div&gt;
      
      &lt;div class=&quot;tweet-body&quot;&gt;Released a new feature for the &lt;a href=&quot;https://twitter.com/logseq&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;@logseq&lt;/a&gt; &lt;a href=&quot;https://twitter.com/OpenAI&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;@OpenAI&lt;/a&gt; GPT-3 plugin!

The `gpt-page` command sends the entire page contents to &lt;a href=&quot;https://twitter.com/hashtag/gpt3&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;#gpt3&lt;/a&gt; for completions

It works across multiple lines, unlike the current `gpt-block` which sends one line

Let me know what you think!

&lt;a href=&quot;https://github.com/briansunter/logseq-plugin-gpt3-openai&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;github.com/briansunter/lo…&lt;/a&gt; https://t.co/IUCWoPWCUt&lt;/div&gt;
      Show more
      
    &lt;div class=&quot;tweet-gif-container&quot;&gt;
      &lt;video muted preload=&quot;auto&quot;&gt;
        &lt;source src=&quot;https://video.twimg.com/tweet_video/Fgf7MPsVQAAg1EH.mp4&quot; type=&quot;video/mp4&quot;&gt;&lt;/source&gt;
      &lt;/video&gt;
      &lt;span class=&quot;tweet-gif-badge&quot;&gt;GIF&lt;/span&gt;
    &lt;/div&gt;
      &lt;a href=&quot;https://twitter.com/Bsunter/status/1587513598896525312&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
        &lt;span class=&quot;tweet-timestamp&quot;&gt;Nov 1, 2022, 6:35 PM&lt;/span&gt;
      &lt;/a&gt;
      &lt;hr /&gt;
      &lt;div class=&quot;tweet-actions&quot;&gt;
        &lt;div class=&quot;tweet-action tweet-action-like&quot;&gt;
          

  
    
  


          &lt;span&gt;62&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class=&quot;tweet-action tweet-action-reply&quot;&gt;
          

  
    
  


          &lt;span&gt;6&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  
&lt;h4&gt;DALL-E&lt;/h4&gt;
&lt;p&gt;OpenAI released their &lt;a href=&quot;https://openai.com/dall-e-2/&quot;&gt;DALL-E&lt;/a&gt; image generation API. I recently incorporated this into the &lt;a href=&quot;https://github.com/briansunter/logseq-plugin-gpt3-openai&quot;&gt;Logseq GPT-3 plugin&lt;/a&gt;, so you can generate images inside Logseq, which are inserted into the editor and saved locally.&lt;/p&gt;
&lt;p&gt;It’s nice to use GPT-3 to generate the prompt, then send it to &lt;a href=&quot;https://openai.com/dall-e-2/&quot;&gt;DALL-E&lt;/a&gt; within the same tool.&lt;/p&gt;

  &lt;div class=&quot;not-prose tweet-embed&quot;&gt;
    &lt;div class=&quot;tweet-card&quot;&gt;
      &lt;a href=&quot;https://twitter.com/Bsunter/status/1590174757651378177&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;&lt;/a&gt;
      &lt;div class=&quot;tweet-header&quot;&gt;
        &lt;div class=&quot;tweet-author&quot;&gt;
          &lt;img src=&quot;https://pbs.twimg.com/profile_images/507230915458646016/POGcr0En_normal.jpeg&quot; alt=&quot;Brian Sunter&apos;s avatar&quot; /&gt;
          &lt;div class=&quot;tweet-author-info&quot;&gt;
            &lt;a href=&quot;https://twitter.com/Bsunter/status/1590174757651378177&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
              &lt;div class=&quot;tweet-author-name-row&quot;&gt;
                &lt;span class=&quot;tweet-author-name&quot;&gt;Brian Sunter&lt;/span&gt;
                

  


              &lt;/div&gt;
            &lt;/a&gt;
            &lt;span class=&quot;tweet-author-handle&quot;&gt;@Bsunter&lt;/span&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;a href=&quot;https://twitter.com/Bsunter/status/1590174757651378177&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;

  
    
  

&lt;/a&gt;
      &lt;/div&gt;
      
      &lt;div class=&quot;tweet-body&quot;&gt;Just released a feature to generate images with &lt;a href=&quot;https://twitter.com/openai&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;@openai&lt;/a&gt; DALL-E inside &lt;a href=&quot;https://twitter.com/logseq&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;@logseq&lt;/a&gt;!

Write a prompt, then type `/dalle` to generate an image using AI, and it inserts the picture underneath the prompt. 

Let me know what you think!

&lt;a href=&quot;https://github.com/briansunter/logseq-plugin-gpt3-openai&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;github.com/briansunter/lo…&lt;/a&gt; https://t.co/uQ2KCkxz7p&lt;/div&gt;
      
      
    &lt;div class=&quot;tweet-video-container&quot;&gt;
      &lt;video controls preload=&quot;metadata&quot; poster=&quot;https://pbs.twimg.com/ext_tw_video_thumb/1590173762434977792/pu/img/VO81Jw0XQ7nDtYuP.jpg&quot;&gt;
        &lt;source src=&quot;https://video.twimg.com/ext_tw_video/1590173762434977792/pu/vid/984x1058/bEtLIxt2Rs505T0k.mp4?tag=14&quot; type=&quot;video/mp4&quot;&gt;&lt;/source&gt;
        Your browser does not support the video tag.
      &lt;/video&gt;
      &lt;a href=&quot;https://twitter.com/Bsunter/status/1590174757651378177&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
        &lt;span class=&quot;tweet-video-fallback-text&quot;&gt;Click to watch on X&lt;/span&gt;
      &lt;/a&gt;
    &lt;/div&gt;
      &lt;a href=&quot;https://twitter.com/Bsunter/status/1590174757651378177&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
        &lt;span class=&quot;tweet-timestamp&quot;&gt;Nov 9, 2022, 2:49 AM&lt;/span&gt;
      &lt;/a&gt;
      &lt;hr /&gt;
      &lt;div class=&quot;tweet-actions&quot;&gt;
        &lt;div class=&quot;tweet-action tweet-action-like&quot;&gt;
          

  
    
  


          &lt;span&gt;99&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class=&quot;tweet-action tweet-action-reply&quot;&gt;
          

  
    
  


          &lt;span&gt;8&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  
&lt;h4&gt;GPT-3 Prompt Templates&lt;/h4&gt;
&lt;p&gt;I’m working on a future feature to add “prompt templates” to the &lt;a href=&quot;https://github.com/briansunter/logseq-plugin-gpt3-openai&quot;&gt;Logseq GPT-3 OpenAI plugin&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;GPT-3 is a powerful machine-learning tool that can generate text. You give it natural language text, called a prompt, and it predicts what text should come after it.&lt;/p&gt;
&lt;p&gt;The prompt can be anything from a simple question to a complex command.&lt;/p&gt;
&lt;p&gt;You must write the prompt in specific ways to get good results from GPT-3.&lt;/p&gt;
&lt;p&gt;Prompt templates will be a way of creating shortcuts for common tasks such as summarization or translation.&lt;/p&gt;
&lt;p&gt;They will behave similarly to Logseq templates, where you can define them in plain text anywhere in your notes. Since they’re just plain texts, users can share them with each other.&lt;/p&gt;
&lt;p&gt;I’ll eventually include these in a modal popup, like other AI tools.&lt;/p&gt;
&lt;p&gt;logseq-openai-prompt-template|See more thoughts on writing prompts and prompt templates here&lt;/p&gt;
&lt;h2&gt;Large Language Models&lt;/h2&gt;
&lt;p&gt;Large language models (LLMs) are AI tools that can perform a wide variety of tasks. LLMs can be used for both search and classification based on the meaning of the text and generating human-like text.&lt;/p&gt;
&lt;p&gt;They were trained by analyzing massive amounts of text collected from the internet&lt;/p&gt;
&lt;p&gt;I think they’re interesting for several reasons:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;You give them tasks by writing commands in English instead of code. To translate, you can ask the LLM, “Translate this text into French.”&lt;/li&gt;
&lt;li&gt;They are very general and can perform a wide range of tasks, even things they weren’t originally trained to do.&lt;/li&gt;
&lt;li&gt;They exhibit a property called “emergence,” where as you train them on more data, they gain new abilities that the creators didn’t anticipate&lt;/li&gt;
&lt;li&gt;They can search and classify text based on meaning instead of just by keywords that appear in the text. I’m really interested in using this for note-taking to find “similar” notes, even if they don’t share any text in common, to uncover interesting connections and relationships.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;why-large-language-models-are-interesting|See more of my thoughts on why large language models are interesting here&lt;/p&gt;
&lt;h2&gt;Headphone Eyemask&lt;/h2&gt;
&lt;figure&gt;&lt;img alt=&quot;image 1667858995655 0&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 550px) 550px, 100vw&quot; width=&quot;550&quot; height=&quot;368&quot; src=&quot;https://briansunter.com/_astro/image_1667858995655_0_1667859078784_0.BxeG58IR_Zfh0dM.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1667858995655_0_1667859078784_0.BxeG58IR_Zfh0dM.webp 550w&quot; /&gt;&lt;figcaption&gt;image 1667858995655 0&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The &lt;a href=&quot;https://briansunter.com/headphone-eye-mask&quot;&gt;headphone-eye-mask&lt;/a&gt; is my new favorite sleep hack.&lt;/p&gt;
&lt;p&gt;It’s an eye mask with built-in Bluetooth headphones, so you can listen to podcasts while falling asleep.&lt;/p&gt;
&lt;p&gt;I often stayed up too late on my phone or computer, overstimulating my brain and disrupting my circadian rhythm by beaming bright blue light into my eyes.&lt;/p&gt;
&lt;p&gt;The headphone eye mask helps slow down my brain with a nightly ritual I enjoy and helps me get to sleep earlier.&lt;/p&gt;
&lt;p&gt;I wrote about headphone-eye-mask|how I use it and some podcast recommendations here.&lt;/p&gt;
&lt;h2&gt;Alamack of Naval Ravikant&lt;/h2&gt;
&lt;p&gt;I enjoyed this book called the &lt;a href=&quot;https://briansunter.com/almanack-of-naval-ravikant&quot;&gt;almanack-of-naval-ravikant&lt;/a&gt;, which is a collection of philosophical[tweets by Naval(https://twitter.com/naval) on wealth creation, learning, mindset, and health.&lt;/p&gt;
&lt;p&gt;It’s not a traditional book since it’s a collection of tweets, but there’s a good assortment of wisdom if you’re OK with the format.&lt;/p&gt;
&lt;p&gt;The book is completely free and you can &lt;a href=&quot;https://www.navalmanack.com/&quot;&gt;download it here&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;almanack-of-naval-ravikant|Read my review and notes on the book here&lt;/p&gt;
&lt;h2&gt;Brain Food 🧠&lt;/h2&gt;
&lt;h3&gt;Quote&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;Specific knowledge is knowledge you cannot be trained for. If society can train you, it can train someone else and replace you.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a href=&quot;https://twitter.com/naval&quot;&gt;Naval Ravikant&lt;/a&gt; (from &lt;a href=&quot;https://briansunter.com/almanack-of-naval-ravikant&quot;&gt;almanack-of-naval-ravikant&lt;/a&gt; )&lt;/p&gt;
&lt;h3&gt;Link of the Week&lt;/h3&gt;
&lt;p&gt;You need to try &lt;a href=&quot;https://chat.openai.com/chat&quot;&gt;ChatGPT&lt;/a&gt;. It’s easy and free to get started. Just log in and ask it anything.&lt;/p&gt;
&lt;p&gt;It’s an AI chatbot that can do a huge range of tasks and is incredibly smart.&lt;/p&gt;
&lt;p&gt;Here are some examples of what it can do:&lt;/p&gt;
&lt;p&gt;It can write an A- college history essay&lt;/p&gt;

  &lt;div class=&quot;not-prose tweet-embed&quot;&gt;
    &lt;div class=&quot;tweet-card&quot;&gt;
      &lt;a href=&quot;https://twitter.com/corry_wang/status/1598176074604507136&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;&lt;/a&gt;
      &lt;div class=&quot;tweet-header&quot;&gt;
        &lt;div class=&quot;tweet-author&quot;&gt;
          &lt;img src=&quot;https://pbs.twimg.com/profile_images/489471126/Aznluster11_forum_avatar_normal.png&quot; alt=&quot;Corry Wang&apos;s avatar&quot; /&gt;
          &lt;div class=&quot;tweet-author-info&quot;&gt;
            &lt;a href=&quot;https://twitter.com/corry_wang/status/1598176074604507136&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
              &lt;div class=&quot;tweet-author-name-row&quot;&gt;
                &lt;span class=&quot;tweet-author-name&quot;&gt;Corry Wang&lt;/span&gt;
                

  


              &lt;/div&gt;
            &lt;/a&gt;
            &lt;span class=&quot;tweet-author-handle&quot;&gt;@corry_wang&lt;/span&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;a href=&quot;https://twitter.com/corry_wang/status/1598176074604507136&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;

  
    
  

&lt;/a&gt;
      &lt;/div&gt;
      
      &lt;div class=&quot;tweet-body&quot;&gt;I guess GPT-3 is old news, but playing with OpenAI’s new chatbot is mindblowing. &lt;a href=&quot;https://chat.openai.com/chat&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;chat.openai.com/chat&lt;/a&gt; 

We’re witnessing the death of the college essay in realtime. Here’s the response to a prompt from one of my 200-level history classes at Amherst

Solid A- work in 10 seconds https://t.co/z1KPxiAc1O&lt;/div&gt;
      
      
    &lt;div class=&quot;tweet-media&quot;&gt;
      &lt;img src=&quot;https://pbs.twimg.com/media/Fi3cqutXkAAiLQ2.jpg&quot; alt=&quot;Tweet media&quot; loading=&quot;lazy&quot; /&gt;
    &lt;/div&gt;
      &lt;a href=&quot;https://twitter.com/corry_wang/status/1598176074604507136&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
        &lt;span class=&quot;tweet-timestamp&quot;&gt;Dec 1, 2022, 4:44 AM&lt;/span&gt;
      &lt;/a&gt;
      &lt;hr /&gt;
      &lt;div class=&quot;tweet-actions&quot;&gt;
        &lt;div class=&quot;tweet-action tweet-action-like&quot;&gt;
          

  
    
  


          &lt;span&gt;7.1K&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class=&quot;tweet-action tweet-action-reply&quot;&gt;
          

  
    
  


          &lt;span&gt;153&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  
&lt;p&gt;It’s also good at coding&lt;/p&gt;

  &lt;div class=&quot;not-prose tweet-embed&quot;&gt;
    &lt;div class=&quot;tweet-card&quot;&gt;
      &lt;a href=&quot;https://twitter.com/amasad/status/1598042665375105024&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;&lt;/a&gt;
      &lt;div class=&quot;tweet-header&quot;&gt;
        &lt;div class=&quot;tweet-author&quot;&gt;
          &lt;img src=&quot;https://pbs.twimg.com/profile_images/1897858917507776512/TRVTyKFk_normal.jpg&quot; alt=&quot;Amjad Masad&apos;s avatar&quot; /&gt;
          &lt;div class=&quot;tweet-author-info&quot;&gt;
            &lt;a href=&quot;https://twitter.com/amasad/status/1598042665375105024&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
              &lt;div class=&quot;tweet-author-name-row&quot;&gt;
                &lt;span class=&quot;tweet-author-name&quot;&gt;Amjad Masad&lt;/span&gt;
                

  


              &lt;/div&gt;
            &lt;/a&gt;
            &lt;span class=&quot;tweet-author-handle&quot;&gt;@amasad&lt;/span&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;a href=&quot;https://twitter.com/amasad/status/1598042665375105024&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;

  
    
  

&lt;/a&gt;
      &lt;/div&gt;
      
      &lt;div class=&quot;tweet-body&quot;&gt;ChatGPT could be a good debugging companion; it not only explains the bug but fixes it and explain the fix 🤯 https://t.co/5x9n66pVqj&lt;/div&gt;
      
      
    &lt;div class=&quot;tweet-media&quot;&gt;
      &lt;img src=&quot;https://pbs.twimg.com/media/Fi1jJQrVQAALlXH.jpg&quot; alt=&quot;Tweet media&quot; loading=&quot;lazy&quot; /&gt;
    &lt;/div&gt;
      &lt;a href=&quot;https://twitter.com/amasad/status/1598042665375105024&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
        &lt;span class=&quot;tweet-timestamp&quot;&gt;Nov 30, 2022, 7:53 PM&lt;/span&gt;
      &lt;/a&gt;
      &lt;hr /&gt;
      &lt;div class=&quot;tweet-actions&quot;&gt;
        &lt;div class=&quot;tweet-action tweet-action-like&quot;&gt;
          

  
    
  


          &lt;span&gt;6.2K&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class=&quot;tweet-action tweet-action-reply&quot;&gt;
          

  
    
  


          &lt;span&gt;102&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  
&lt;p&gt;Some of my favorite examples are the weird, funny ones. Here’s one where it writes a Seinfeld script about Jerry learning programming&lt;/p&gt;

  &lt;div class=&quot;not-prose tweet-embed&quot;&gt;
    &lt;div class=&quot;tweet-card&quot;&gt;
      &lt;a href=&quot;https://twitter.com/goodside/status/1598077257498923010&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;&lt;/a&gt;
      &lt;div class=&quot;tweet-header&quot;&gt;
        &lt;div class=&quot;tweet-author&quot;&gt;
          &lt;img src=&quot;https://pbs.twimg.com/profile_images/1027023337497800704/4rtouf4R_normal.jpg&quot; alt=&quot;Riley Goodside&apos;s avatar&quot; /&gt;
          &lt;div class=&quot;tweet-author-info&quot;&gt;
            &lt;a href=&quot;https://twitter.com/goodside/status/1598077257498923010&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
              &lt;div class=&quot;tweet-author-name-row&quot;&gt;
                &lt;span class=&quot;tweet-author-name&quot;&gt;Riley Goodside&lt;/span&gt;
                

  


              &lt;/div&gt;
            &lt;/a&gt;
            &lt;span class=&quot;tweet-author-handle&quot;&gt;@goodside&lt;/span&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;a href=&quot;https://twitter.com/goodside/status/1598077257498923010&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;

  
    
  

&lt;/a&gt;
      &lt;/div&gt;
      
      &lt;div class=&quot;tweet-body&quot;&gt;OpenAI&apos;s new ChatGPT writes a Seinfeld scene in which Jerry needs to learn the bubble sort algorithm: https://t.co/yjPlrA3OmE&lt;/div&gt;
      
      &lt;div class=&quot;tweet-media-grid tweet-media-grid-3&quot;&gt;&lt;div class=&quot;tweet-grid-item&quot;&gt;&lt;img src=&quot;https://pbs.twimg.com/media/Fi2CKN4XEAEu47C.jpg&quot; alt=&quot;Tweet media&quot; loading=&quot;lazy&quot; /&gt;&lt;/div&gt;&lt;div class=&quot;tweet-grid-item&quot;&gt;&lt;img src=&quot;https://pbs.twimg.com/media/Fi2CbYpXoAAQqxg.png&quot; alt=&quot;Tweet media&quot; loading=&quot;lazy&quot; /&gt;&lt;/div&gt;&lt;div class=&quot;tweet-grid-item&quot;&gt;&lt;img src=&quot;https://pbs.twimg.com/media/Fi2Cg5ZX0A8qCcZ.png&quot; alt=&quot;Tweet media&quot; loading=&quot;lazy&quot; /&gt;&lt;/div&gt;&lt;/div&gt;
      &lt;a href=&quot;https://twitter.com/goodside/status/1598077257498923010&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
        &lt;span class=&quot;tweet-timestamp&quot;&gt;Nov 30, 2022, 10:11 PM&lt;/span&gt;
      &lt;/a&gt;
      &lt;hr /&gt;
      &lt;div class=&quot;tweet-actions&quot;&gt;
        &lt;div class=&quot;tweet-action tweet-action-like&quot;&gt;
          

  
    
  


          &lt;span&gt;3.7K&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class=&quot;tweet-action tweet-action-reply&quot;&gt;
          

  
    
  


          &lt;span&gt;70&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Why Large Language Models are Interesting</title><link>https://briansunter.com/why-large-language-models-are-interesting</link><guid isPermaLink="true">https://briansunter.com/why-large-language-models-are-interesting</guid><description>Large language models have a number of interesting properties</description><pubDate>Sat, 26 Nov 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/Screen_Shot_2022-09-11_at_8.35.17_PM_1668815306606_0.8INbI7k5_1E3FME.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;p&gt;I continue to be interested in this new AI technology called “Large Language Models” (LLMs)&lt;/p&gt;
&lt;p&gt;Large language models are AI tools that can perform a wide variety of tasks. They can be used for both search and classification based on the meaning of the text and generating human-like text.&lt;/p&gt;
&lt;p&gt;They were trained by analyzing massive amounts of text from Wikipedia and Reddit.&lt;/p&gt;
&lt;p&gt;I think they are interesting for three reasons:&lt;/p&gt;
&lt;h4&gt;Natural Language Interface&lt;/h4&gt;
&lt;p&gt;First, you can interact with the text generation capabilities using natural language instead of code.&lt;/p&gt;
&lt;p&gt;For example, you can ask it, “Translate this sentence into French:” or “Summarize this news article:”.&lt;/p&gt;
&lt;p&gt;This is a new way of coding, where you can use English language to perform valuable tasks instead of writing code.&lt;/p&gt;
&lt;p&gt;There’s exciting research in this area, such as Google’s “PromptChainer,” which lets you build AI-enabled apps by chaining together these English commands using a visual interface.&lt;/p&gt;
&lt;p&gt;AI-enabled “no code” interfaces like this could allow non-programmers to perform useful tasks and create powerful applications.&lt;/p&gt;
&lt;h4&gt;Generality and Emergence&lt;/h4&gt;
&lt;p&gt;Second, LLMs extremely general and can perform a wide variety of tasks, even things they weren’t originally trained to do. Earlier AI models could only perform tasks they were explicitly trained to do, like summarization or translation. GPT-3 can do things like multiply numbers, even though it wasn’t trained to do multiplication.&lt;/p&gt;
&lt;p&gt;These LLMs improve and gain new abilities as they are trained on more text. So as you feed them more data, they become more accurate and can do new types of tasks.&lt;/p&gt;
&lt;p&gt;This behavior is called “emergent abilities”, whereas a model becomes larger, it can do things smaller models can’t do.&lt;/p&gt;
&lt;p&gt;For example, the ability to perform tasks like arithmetic and answering college entrance exam questions only “emerge” after you feed the AI a certain amount of data.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Screen Shot 2022-09-11 at 8.35.17 PM&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1226px) 1226px, 100vw&quot; width=&quot;1226&quot; height=&quot;566&quot; src=&quot;https://briansunter.com/_astro/Screen_Shot_2022-09-11_at_8.35.17_PM_1668815306606_0.8INbI7k5_Z196oC4.webp&quot; srcset=&quot;https://briansunter.com/_astro/Screen_Shot_2022-09-11_at_8.35.17_PM_1668815306606_0.8INbI7k5_Z1TTa9M.webp 640w, https://briansunter.com/_astro/Screen_Shot_2022-09-11_at_8.35.17_PM_1668815306606_0.8INbI7k5_ZvWXBE.webp 750w, https://briansunter.com/_astro/Screen_Shot_2022-09-11_at_8.35.17_PM_1668815306606_0.8INbI7k5_Z1T2FsK.webp 828w, https://briansunter.com/_astro/Screen_Shot_2022-09-11_at_8.35.17_PM_1668815306606_0.8INbI7k5_Z1OzOJQ.webp 1080w, https://briansunter.com/_astro/Screen_Shot_2022-09-11_at_8.35.17_PM_1668815306606_0.8INbI7k5_Z196oC4.webp 1226w&quot; /&gt;&lt;figcaption&gt;Screen Shot 2022-09-11 at 8.35.17 PM&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;This opens up the exciting possibility that by feeding AI more data, it can gain new abilities unforeseen by its creators. The recent advancements in computing performance allow us to generate AI models that are much, much larger than before.&lt;/p&gt;
&lt;p&gt;We see similar behavior in “reinforcement learning,” like Google’s Alpha Zero Go board game engine. Instead of experts building strategies for board games, like a database of optimal opening and endgame moves, these systems teach themselves by playing millions of games against themselves. This allows them to develop strategies the creators couldn’t have imagined.&lt;/p&gt;
&lt;h4&gt;Semantic Search and Classification&lt;/h4&gt;
&lt;p&gt;Third, in addition to generating text, these models can also be used for search and classification. Instead of just searching for words that appear in the text, they can find text with similar meanings.&lt;/p&gt;
&lt;p&gt;This “semantic search” technology is one of the reasons Google search is so good, and you can find what you’re looking for even if the exact phrase doesn’t appear in the text. Until recently, this tech was only available inside large tech companies, but it’s finally becoming more accessible.&lt;/p&gt;
&lt;p&gt;Since the AI understands the meaning of text, it can also be used to group texts and discover hidden relationships between them.&lt;/p&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Logseq GPT Prompt Templates</title><link>https://briansunter.com/logseq-openai-prompt-template</link><guid isPermaLink="true">https://briansunter.com/logseq-openai-prompt-template</guid><description>Thoughts on prompt templates for the Logseq OpenAI Plugin</description><pubDate>Wed, 16 Nov 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/logseq-openai-hero.CSDE4IcA_Z1ed0v6.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;p&gt;See the &lt;a href=&quot;https://github.com/briansunter/logseq-plugin-gpt3-openai&quot;&gt;Logseq GPT-3 OpenAI plugin here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;GPT-3 is a powerful machine-learning tool that can generate text. You give it natural language text, called a prompt, and it predicts what text should come after it.&lt;/p&gt;
&lt;p&gt;The prompt can be anything from a simple question to a complex command, and it can perform many different tasks, such as translation, summarization, and basic reasoning.&lt;/p&gt;
&lt;h3&gt;Prompt Engineering&lt;/h3&gt;
&lt;p&gt;Asking AI to perform a task with natural language is simple and convenient. However, you need to phrase the prompt in very specific ways to get useful and predictable results.&lt;/p&gt;
&lt;p&gt;For example, you can ask it to translate text using a prompt like this.&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;plaintext&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Translate Spanish to English:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Yo vivo en Granada, una ciudad pequeña que tiene monumentos muy importantes como la Alhambra.&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Sometimes this will work and translate the sentence into English, but since GPT-3 predicts the next phrase, it will often just continue writing Spanish instead of translating.&lt;/p&gt;
&lt;p&gt;We can make the prompt more reliable by giving it more context and trying to “constrain” the possible output.&lt;/p&gt;
&lt;p&gt;Adding Prefixes like &lt;code&gt;Spanish:&lt;/code&gt; and &lt;code&gt;English:&lt;/code&gt; increases the reliability.&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;plaintext&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Translate Spanish to English.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Spanish: Yo vivo en Granada, una ciudad pequeña que tiene monumentos muy importantes como la Alhambra.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;English:&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;GPT-3 is complex and unpredictable. People are constantly finding new best practices and “tricks” to improve accuracy and reliability.&lt;/p&gt;
&lt;p&gt;For example, researchers have discovered that just adding the phrase “Let’s think step by step” before each answer increases the accuracy on benchmarks like MultiArith from 17.7% to 78.7% and GSM8K from 10.4% to 40.7%&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;plaintext&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Q: On average Joe throws 25 punches per&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;minute. A fight lasts 5 rounds of 3 minutes. How&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;many punches did he throw?&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;*A: Let&apos;s think step by step.**&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h4&gt;Zero-shot, One-shot, Few-shot&lt;/h4&gt;
&lt;p&gt;You can also include examples of the output you’re expecting in the prompt. This often (but not always) makes the output more predictable and accurate.&lt;/p&gt;
&lt;p&gt;Prompts with examples are called one/few-shot. Prompts without solved examples are called “zero-shot.”&lt;/p&gt;
&lt;p&gt;For example, you can include an example of an English-to-French translation. This is a “one-shot” prompt.&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;plaintext&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Translate English to French:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;English: sea otter&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;French: loutre de mer&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;English: cheese&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;French:&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3&gt;GPT-3 Prompt Templates&lt;/h3&gt;
&lt;p&gt;GPT-3 needs to be prompted in very specific ways, and these often have to be discovered by trial and error. How can we share best practices and make GPT-3 easier to use? Prompt Templates&lt;/p&gt;
&lt;p&gt;The existing Logseq template feature allows you to add text snippets to the / command.&lt;/p&gt;
&lt;p&gt;Now you can insert the template text using the template name.&lt;/p&gt;
&lt;p&gt;I want to make something similar for the GPT-3 plugin.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;prompt-template&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 950px) 950px, 100vw&quot; width=&quot;950&quot; height=&quot;566&quot; src=&quot;https://briansunter.com/_astro/prompt-template_1668636545451_0.cgpYFa6n_Z1itKt3.webp&quot; srcset=&quot;https://briansunter.com/_astro/prompt-template_1668636545451_0.cgpYFa6n_Z2jndAW.webp 640w, https://briansunter.com/_astro/prompt-template_1668636545451_0.cgpYFa6n_Z1PiErt.webp 750w, https://briansunter.com/_astro/prompt-template_1668636545451_0.cgpYFa6n_UKyD.webp 828w, https://briansunter.com/_astro/prompt-template_1668636545451_0.cgpYFa6n_Z1itKt3.webp 950w&quot; /&gt;&lt;figcaption&gt;prompt-template&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;If I wanted to translate from English to French, I could use a “prompt template” known to produce good output, and inject my phrase into it. The input variables are surrounded by &lt;code&gt;{{}}&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;We can also include GPT-3 configuration options such as &lt;code&gt;temperature&lt;/code&gt; and &lt;code&gt;maxTokens&lt;/code&gt;.&lt;/p&gt;
&lt;h4&gt;English to French Translation Prompt Template&lt;/h4&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;plaintext&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Translate English to French:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;English: sea otter&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;French: loutre de mer&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;English: {{ input }}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;French:&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h4&gt;Summarize Text&lt;/h4&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;plaintext&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Summarize this for a second-grade student:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;{{ input }}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h4&gt;Grammar Correction&lt;/h4&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;plaintext&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Correct this to standard English:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;{{ input }}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h4&gt;GPT Modes&lt;/h4&gt;
&lt;h4&gt;Edit in Place&lt;/h4&gt;
&lt;p&gt;Edit allows you to update text in place instead of completing it and inserting it in the block below.&lt;/p&gt;
&lt;h4&gt;Correct Grammar in Place&lt;/h4&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;plaintext&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Correct this to standard English:&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h4&gt;Insert&lt;/h4&gt;
&lt;p&gt;The new &lt;a href=&quot;https://platform.openai.com/docs/guides/text-generation&quot;&gt;insert capability&lt;/a&gt; adds the contextually relevant text in the middle of existing content.&lt;/p&gt;
&lt;p&gt;Allows you to specify where the text should be injected by writing &lt;code&gt;[[insert]]&lt;/code&gt; in the prompt.&lt;/p&gt;
&lt;h4&gt;Additional GPT-3 Configuration Options&lt;/h4&gt;
&lt;p&gt;The templates will allow you to specify options on a per-template basis&lt;/p&gt;
&lt;h5&gt;Model&lt;/h5&gt;
&lt;p&gt;Allow users to specify the AI model to be used, such as &lt;code&gt;text-davinci-003&lt;/code&gt; or &lt;code&gt;code-danci-002&lt;/code&gt; for code tasks.&lt;/p&gt;
&lt;h4&gt;Stop sequences&lt;/h4&gt;
&lt;p&gt;The phrase that causes GPT-3 to stop generating more text&lt;/p&gt;
&lt;h4&gt;Frequency/Presence Penalty&lt;/h4&gt;
&lt;p&gt;Settings to prevent repetition in the generated text&lt;/p&gt;
&lt;h4&gt;Top-P&lt;/h4&gt;
&lt;p&gt;It affects randomness and variance, similar to temperature&lt;/p&gt;
&lt;h3&gt;Future work&lt;/h3&gt;
&lt;h4&gt;Modal Popup&lt;/h4&gt;
&lt;p&gt;I’m also planning on adding a feature where instead of writing the prompt in your notes, there will be a popup where you write the prompt and review the output before inserting it into your notes.&lt;/p&gt;
&lt;p&gt;This feature is being developed in parallel with the template feature.&lt;/p&gt;
&lt;h4&gt;Chaining&lt;/h4&gt;
&lt;p&gt;You can accomplish much more by chaining the output from one prompt into the input of another prompt.&lt;/p&gt;
&lt;p&gt;It would also be interesting to enrich the prompt source with calls to the internet.&lt;/p&gt;
&lt;h4&gt;Text Transformation&lt;/h4&gt;
&lt;p&gt;I’d also like to include some options to process the input or output with code or regex.&lt;/p&gt;
&lt;p&gt;For example, you could split the output into multiple lines in logseq or extract highlighted terms from the input.&lt;/p&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Headphone Eye Mask</title><link>https://briansunter.com/headphone-eye-mask</link><guid isPermaLink="true">https://briansunter.com/headphone-eye-mask</guid><description>How I use a Bluetooth headphone eye mask to sleep better</description><pubDate>Mon, 07 Nov 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/image_1667858995655_0_1667859078784_0.BxeG58IR_Z16X55y.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.amazon.com/dp/B07TPLZY74?tag=mus0a-21&quot;&gt;Amazon Link to headphone eye mask that I use (affiliate)&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Why are you staying up so late?&lt;/h3&gt;
&lt;p&gt;You likely have “revenge bedtime procrastination” and are messing up your circadian rhythm with bright light exposure before bed.&lt;/p&gt;
&lt;h3&gt;Revenge Bedtime Procrastination&lt;/h3&gt;
&lt;blockquote&gt;&lt;p&gt;Learned a very relatable term today: “報復性熬夜” (revenge bedtime procrastination), a phenomenon in which people who don’t have much control over their daytime life refuse to sleep early in order to regain some sense of freedom during late night hours.&lt;/p&gt;— daphne (@daphnekylee) &lt;a href=&quot;?ref_src=twsrc%5Etfw&quot;&gt;June 28, 2020&lt;/a&gt;&lt;/blockquote&gt; 
&lt;p&gt;If you struggle to fall asleep at night, you may be a victim of revenge bedtime procrastination. This is when you stay up late to do something you know you shouldn’t be doing, like watching television or scrolling through social media.&lt;/p&gt;
&lt;p&gt;You tell yourself, “I’ll just watch one more episode,” or “I’ll just read a few more articles.”&lt;/p&gt;
&lt;p&gt;You know you should be asleep hours ago, but you can’t seem to drift off. You keep scrolling through your phone, checking the news, and scrolling some more.&lt;/p&gt;
&lt;p&gt;It’s a common problem in our 24/7 world, where we’re always connected, and there’s always something new to consume. A &lt;a href=&quot;https://aasm.org/are-you-tiktok-tired-93-of-gen-z-admit-to-staying-up-past-their-bedtime-due-to-social-media/&quot;&gt;survey from the American Academy of Sleep Medicine&lt;/a&gt; found that 93% of Gen Z have lost sleep because they stayed up “past their bedtime” to view or participate in social media.&lt;/p&gt;
&lt;h3&gt;Circadian Rhythm&lt;/h3&gt;
&lt;p&gt;Bright light from electronics is terrible for your natural sleep cycles. Studies have shown that exposure to bright light before bed can disrupt your circadian rhythm and make it harder to fall asleep.&lt;/p&gt;
&lt;p&gt;Circadian rhythm is the 24-hour internal clock that dictates hormones, energy levels, and when we feel awake or sleepy.&lt;/p&gt;
&lt;p&gt;You’ll naturally feel sleepy at night and get better sleep if you avoid disrupting your circadian rhythm.&lt;/p&gt;

  &lt;div class=&quot;not-prose tweet-embed&quot;&gt;
    &lt;div class=&quot;tweet-card&quot;&gt;
      &lt;a href=&quot;https://twitter.com/hubermanlab/status/1518987142453547009&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;&lt;/a&gt;
      &lt;div class=&quot;tweet-header&quot;&gt;
        &lt;div class=&quot;tweet-author&quot;&gt;
          &lt;img src=&quot;https://pbs.twimg.com/profile_images/1339713932085346306/jDTi4HKH_normal.jpg&quot; alt=&quot;Andrew D. Huberman, Ph.D.&apos;s avatar&quot; /&gt;
          &lt;div class=&quot;tweet-author-info&quot;&gt;
            &lt;a href=&quot;https://twitter.com/hubermanlab/status/1518987142453547009&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
              &lt;div class=&quot;tweet-author-name-row&quot;&gt;
                &lt;span class=&quot;tweet-author-name&quot;&gt;Andrew D. Huberman, Ph.D.&lt;/span&gt;
                

  


              &lt;/div&gt;
            &lt;/a&gt;
            &lt;span class=&quot;tweet-author-handle&quot;&gt;@hubermanlab&lt;/span&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;a href=&quot;https://twitter.com/hubermanlab/status/1518987142453547009&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;

  
    
  

&lt;/a&gt;
      &lt;/div&gt;
      
      &lt;div class=&quot;tweet-body&quot;&gt;However, due to circadian shifts in retinal sensitivity, once night time rolls around, you can easily suppress melatonin production &amp;amp;amp; alter your circadian clock by viewing light that is too bright (any color, not just blue light). Thus, best to avoid bright lights ~10pm to 4am.&lt;/div&gt;
      
      
      &lt;a href=&quot;https://twitter.com/hubermanlab/status/1518987142453547009&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
        &lt;span class=&quot;tweet-timestamp&quot;&gt;Apr 26, 2022, 4:15 PM&lt;/span&gt;
      &lt;/a&gt;
      &lt;hr /&gt;
      &lt;div class=&quot;tweet-actions&quot;&gt;
        &lt;div class=&quot;tweet-action tweet-action-like&quot;&gt;
          

  
    
  


          &lt;span&gt;332&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class=&quot;tweet-action tweet-action-reply&quot;&gt;
          

  
    
  


          &lt;span&gt;15&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  

  &lt;div class=&quot;not-prose tweet-embed&quot;&gt;
    &lt;div class=&quot;tweet-card&quot;&gt;
      &lt;a href=&quot;https://twitter.com/hubermanlab/status/1585455763916345344&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;&lt;/a&gt;
      &lt;div class=&quot;tweet-header&quot;&gt;
        &lt;div class=&quot;tweet-author&quot;&gt;
          &lt;img src=&quot;https://pbs.twimg.com/profile_images/1339713932085346306/jDTi4HKH_normal.jpg&quot; alt=&quot;Andrew D. Huberman, Ph.D.&apos;s avatar&quot; /&gt;
          &lt;div class=&quot;tweet-author-info&quot;&gt;
            &lt;a href=&quot;https://twitter.com/hubermanlab/status/1585455763916345344&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
              &lt;div class=&quot;tweet-author-name-row&quot;&gt;
                &lt;span class=&quot;tweet-author-name&quot;&gt;Andrew D. Huberman, Ph.D.&lt;/span&gt;
                

  


              &lt;/div&gt;
            &lt;/a&gt;
            &lt;span class=&quot;tweet-author-handle&quot;&gt;@hubermanlab&lt;/span&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;a href=&quot;https://twitter.com/hubermanlab/status/1585455763916345344&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;

  
    
  

&lt;/a&gt;
      &lt;/div&gt;
      
      &lt;div class=&quot;tweet-body&quot;&gt;Night light exposure associated w/greater odds of major depressive disorder, generalized anxiety disorder (GAD),  (PTSD), self-harm behavior &amp;amp;amp; psychotic experiences. Conversely greater daytime light exposure lower odds of MDD, PTSD, self-harm … (edited)
&lt;a href=&quot;https://www.medrxiv.org/content/10.1101/2022.10.16.22280934v1&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;medrxiv.org/content/10.110…&lt;/a&gt;&lt;/div&gt;
      
      
      &lt;a href=&quot;https://twitter.com/hubermanlab/status/1585455763916345344&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
        &lt;span class=&quot;tweet-timestamp&quot;&gt;Oct 27, 2022, 2:18 AM&lt;/span&gt;
      &lt;/a&gt;
      &lt;hr /&gt;
      &lt;div class=&quot;tweet-actions&quot;&gt;
        &lt;div class=&quot;tweet-action tweet-action-like&quot;&gt;
          

  
    
  


          &lt;span&gt;939&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class=&quot;tweet-action tweet-action-reply&quot;&gt;
          

  
    
  


          &lt;span&gt;30&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  
&lt;h4&gt;Headphone Eye Mask&lt;/h4&gt;
&lt;p&gt;So what’s the solution?&lt;/p&gt;
&lt;p&gt;Listening to podcasts with a headphone eye mask&lt;/p&gt;
&lt;p&gt;If you’re unfamiliar, a headphone eye mask is an eye mask with built-in Bluetooth headphones. You can listen to a podcast while wearing the eye mask, which blocks out all light.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.amazon.com/dp/B07TPLZY74?tag=mus0a-21&quot;&gt;You can buy the one I prefer here (affiliate)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;These are flat and go over your ears, which I prefer instead of having AirPods inside my ears or large headphones over my ears.&lt;/p&gt;
&lt;p&gt;Simply coercing yourself to go to bed early is hard, so I prefer to replace my doomscrolling with a healthier habit that I look forward to before bed.&lt;/p&gt;
&lt;p&gt;Putting on the mask cuts off your access to distractions, signals to the brain it’s time for bed, and makes it easier to focus on winding down for the night.&lt;/p&gt;
&lt;p&gt;I’ve found audio content slows down my brain compared to reactive scrolling.&lt;/p&gt;
&lt;p&gt;Thirty minutes before I want to go to bed, I put on a podcast with a sleep timer, so it shuts off after an hour, and listen to it while I drift off to sleep.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;IMG 8168 1667860673832 0&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 385px) 385px, 100vw&quot; width=&quot;385&quot; height=&quot;808&quot; src=&quot;https://briansunter.com/_astro/IMG_8168_1667860673832_0_1667947938192_0.D_UwxiMT_ALSE5.webp&quot; srcset=&quot;https://briansunter.com/_astro/IMG_8168_1667860673832_0_1667947938192_0.D_UwxiMT_ALSE5.webp 385w&quot; /&gt;&lt;figcaption&gt;IMG 8168 1667860673832 0&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;My favorite type of audio content is podcast interviews, but a vast range of audio content is available, including podcasts specifically meant for falling asleep.&lt;/p&gt;
&lt;p&gt;You won’t fully absorb the content if you’re listening to it while falling asleep, so I usually re-listen to it on my morning walk the next day.&lt;/p&gt;
&lt;p&gt;Sometimes I feel guilty about not fully absorbing the podcasts, but there’s so much content that I’ll never listen to it all anyway.&lt;/p&gt;
&lt;p&gt;I don’t listen to audiobooks since those are a bit more stimulating and require more long-term attention.&lt;/p&gt;
&lt;h4&gt;Suggested Podcasts&lt;/h4&gt;
&lt;p&gt;These are some of the podcasts I’ve been listening to recently.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.thisamericanlife.org&quot;&gt;This American life&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://lewishowes.com/sogpodcast/&quot;&gt;Lewis Howes School of Greatness&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://lexfridman.com/podcast/&quot;&gt;Lex Fridman Podcast&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://hubermanlab.com/category/podcast-episodes/&quot;&gt;Huberman Lab&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://tim.blog/podcast/&quot;&gt;Tim Ferriss Show&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://themoth.org/podcast&quot;&gt;The Moth&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.lorepodcast.com/episodes&quot;&gt;Lore&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.dancarlin.com/hardcore-history-series/&quot;&gt;Hardcore History&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.philosophizethis.org/podcasts&quot;&gt;Philosophize This!&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If you’re struggling to get a good night’s sleep, give a headphone eye mask a try. It might be the key to breaking your cycle of bedtime procrastination and getting the rest you need.&lt;/p&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator><category>blog</category></item><item><title>Omnivore Logseq Guide</title><link>https://briansunter.com/omnivore-logseq-guide</link><guid isPermaLink="true">https://briansunter.com/omnivore-logseq-guide</guid><description>Save articles to read later and sync your highlights to Logseq automatically.</description><pubDate>Wed, 26 Oct 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/image_1662086881256_0.BDrS6BOl_Z2rlg5i.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;p&gt;If you want to read content online much more efficiently and remember what you read, I highly recommend using a “Read it later” app, which allows you to save interesting links you find.&lt;/p&gt;
&lt;p&gt;I like to browse the top stories on Reddit, HackerNews, or other news sites and save interesting articles, then read them all at once later, which is much more efficient. (This only works if you actually have a routine to read the links you save). You can read social media as RSS btw.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://omnivore.app/&quot;&gt;Omnivore&lt;/a&gt; is an open source “read it later” app.&lt;/p&gt;
&lt;p&gt;It allows you to save link using their iOS app or Chrome extension. You can read the article in a simplified “reader view” (which I think makes most content look much nicer) and it allows you to highlight important parts of articles in the app.&lt;/p&gt;
&lt;p&gt;After you save an article or highlight it, you can view those highlights in the app or online.&lt;/p&gt;
&lt;p&gt;It is super streamlined unlike a lot of the other bloated read it later apps.&lt;/p&gt;
&lt;p&gt;It is similar to &lt;a href=&quot;https://getpocket.com/en/&quot;&gt;Pocket&lt;/a&gt; or &lt;a href=&quot;https://www.instapaper.com/&quot;&gt;Instapaper&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It also supports a few advanced features.&lt;/p&gt;
&lt;p&gt;They provide nice filtering based on “labels” for you to organize your links. If you like logseq you’ll probably like organizing your links with tags and queries.&lt;/p&gt;
&lt;p&gt;They provide a hosted solution, but it is &lt;a href=&quot;https://github.com/omnivore-app/omnivore&quot;&gt;open source so you can run it yourself&lt;/a&gt; if you want to. Logseq is also open source. You can know that you can use both of these apps for free, forever, no matter what happens to these companies. I save a lot of links, so it would be nice to just never have to migrate or get locked behind a paywall ever for basic link saving and highlighting.&lt;/p&gt;
&lt;p&gt;They have a nice, simple GraphQL library which you can build apps on top of like the &lt;a href=&quot;https://github.com/omnivore-app/logseq-omnivore&quot;&gt;omnivore logeseq plugin&lt;/a&gt; or &lt;a href=&quot;https://github.com/davidohlin/instapaper-to-omnivore-import&quot;&gt;bulk import/export tools&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It allows you to generate emails so you can read &lt;a href=&quot;https://omnivore.app/help/newsletters&quot;&gt;newsletters in omnivore&lt;/a&gt; when you get them.&lt;/p&gt;
&lt;p&gt;It has a really nice logseq plugin&lt;/p&gt;
&lt;h2&gt;Omnivore Plugin&lt;/h2&gt;
&lt;p&gt;This is what it looks like in your graph&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;image&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1308px) 1308px, 100vw&quot; width=&quot;1308&quot; height=&quot;1712&quot; src=&quot;https://briansunter.com/_astro/image_1662086799530_0.iexMOJ-T_1vRV3m.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1662086799530_0.iexMOJ-T_Z1QlMiX.webp 640w, https://briansunter.com/_astro/image_1662086799530_0.iexMOJ-T_Z27Op9A.webp 750w, https://briansunter.com/_astro/image_1662086799530_0.iexMOJ-T_1yhHow.webp 828w, https://briansunter.com/_astro/image_1662086799530_0.iexMOJ-T_10VuQ3.webp 1080w, https://briansunter.com/_astro/image_1662086799530_0.iexMOJ-T_Z1p9WIV.webp 1280w, https://briansunter.com/_astro/image_1662086799530_0.iexMOJ-T_1vRV3m.webp 1308w&quot; /&gt;&lt;figcaption&gt;image&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;It makes a new page in your graph called &lt;code&gt;Omnivore&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Whenever you push the yellow omnivore button, it syncs this page with your omnivore links and highlights.&lt;/p&gt;
&lt;p&gt;It shows a nice list of links, a short excerpt, and all your highlights nested underneath.&lt;/p&gt;
&lt;h2&gt;Plugin Setup Guide&lt;/h2&gt;
&lt;p&gt;First sign up for an omnivore account, just visit https://omnivore.app/&lt;/p&gt;
&lt;p&gt;Remember your omnivore username&lt;/p&gt;
&lt;p&gt;Generate an omnivore api key here. https://omnivore.app/settings/api&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;image&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1872px) 1872px, 100vw&quot; width=&quot;1872&quot; height=&quot;1734&quot; src=&quot;https://briansunter.com/_astro/image_1662086816611_0.DVN6fPTp_1CfFNE.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1662086816611_0.DVN6fPTp_Z2lW9GS.webp 640w, https://briansunter.com/_astro/image_1662086816611_0.DVN6fPTp_10Midr.webp 750w, https://briansunter.com/_astro/image_1662086816611_0.DVN6fPTp_Z1q4lqt.webp 828w, https://briansunter.com/_astro/image_1662086816611_0.DVN6fPTp_Z1dqrbh.webp 1080w, https://briansunter.com/_astro/image_1662086816611_0.DVN6fPTp_gmzct.webp 1280w, https://briansunter.com/_astro/image_1662086816611_0.DVN6fPTp_28Wz4k.webp 1668w, https://briansunter.com/_astro/image_1662086816611_0.DVN6fPTp_1CfFNE.webp 1872w&quot; /&gt;&lt;figcaption&gt;image&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Get the &lt;code&gt;logseq-omnivore&lt;/code&gt; &lt;a href=&quot;https://github.com/omnivore-app/logseq-omnivore&quot;&gt;plugin&lt;/a&gt; from the marketplace&lt;/p&gt;
&lt;p&gt;Update the plugin settings with the values you got earlier&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;image&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 800px) 800px, 100vw&quot; width=&quot;800&quot; height=&quot;496&quot; src=&quot;https://briansunter.com/_astro/image_1662086831539_0.BT9qYpEn_ZMBEmD.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1662086831539_0.BT9qYpEn_gde41.webp 640w, https://briansunter.com/_astro/image_1662086831539_0.BT9qYpEn_ZfLPl8.webp 750w, https://briansunter.com/_astro/image_1662086831539_0.BT9qYpEn_ZMBEmD.webp 800w&quot; /&gt;&lt;figcaption&gt;image&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Click the yellow omnivore button on your logseq toolbar.&lt;/p&gt;
&lt;p&gt;Now all of the articles you saved and your highlights from the app and chrome extension show up in your Logseq graph on a page called Omnivore.&lt;/p&gt;
&lt;h2&gt;Omnivore app&lt;/h2&gt;
&lt;h3&gt;Web app&lt;/h3&gt;
&lt;p&gt;The web app is clean and straightforward.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;image&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 2421px) 2421px, 100vw&quot; width=&quot;2421&quot; height=&quot;697&quot; src=&quot;https://briansunter.com/_astro/image_1662086844009_0.CMK1lJgh_ZxB5K.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1662086844009_0.CMK1lJgh_Z1wSIcy.webp 640w, https://briansunter.com/_astro/image_1662086844009_0.CMK1lJgh_Z1J2phV.webp 750w, https://briansunter.com/_astro/image_1662086844009_0.CMK1lJgh_pv0He.webp 828w, https://briansunter.com/_astro/image_1662086844009_0.CMK1lJgh_HzY8o.webp 1080w, https://briansunter.com/_astro/image_1662086844009_0.CMK1lJgh_Z1H9vkH.webp 1280w, https://briansunter.com/_astro/image_1662086844009_0.CMK1lJgh_1haV5b.webp 1668w, https://briansunter.com/_astro/image_1662086844009_0.CMK1lJgh_Z1GHcCw.webp 2048w, https://briansunter.com/_astro/image_1662086844009_0.CMK1lJgh_ZxB5K.webp 2421w&quot; /&gt;&lt;figcaption&gt;image&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The chrome extension is simple and fast as well. A browser extension is essential for a web clipper tool.&lt;/p&gt;
&lt;p&gt;It has an awesome reader view for web articles&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;image&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 842px) 842px, 100vw&quot; width=&quot;842&quot; height=&quot;890&quot; src=&quot;https://briansunter.com/_astro/image_1662086866434_0.DbhBIz_7_CDhG7.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1662086866434_0.DbhBIz_7_Z1lww8B.webp 640w, https://briansunter.com/_astro/image_1662086866434_0.DbhBIz_7_ZiMQNU.webp 750w, https://briansunter.com/_astro/image_1662086866434_0.DbhBIz_7_LNS9J.webp 828w, https://briansunter.com/_astro/image_1662086866434_0.DbhBIz_7_CDhG7.webp 842w&quot; /&gt;&lt;figcaption&gt;image&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h3&gt;iOS app&lt;/h3&gt;
&lt;p&gt;The iOS app is simple and excellent as well. It has a nice list view of your links.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;image&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1284px) 1284px, 100vw&quot; width=&quot;1284&quot; height=&quot;2778&quot; src=&quot;https://briansunter.com/_astro/image_1662086881256_0.BDrS6BOl_ZfXUMh.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1662086881256_0.BDrS6BOl_NS4iS.webp 640w, https://briansunter.com/_astro/image_1662086881256_0.BDrS6BOl_Z2a5phF.webp 750w, https://briansunter.com/_astro/image_1662086881256_0.BDrS6BOl_9O1jt.webp 828w, https://briansunter.com/_astro/image_1662086881256_0.BDrS6BOl_DJz2J.webp 1080w, https://briansunter.com/_astro/image_1662086881256_0.BDrS6BOl_Z1bKY3w.webp 1280w, https://briansunter.com/_astro/image_1662086881256_0.BDrS6BOl_ZfXUMh.webp 1284w&quot; /&gt;&lt;figcaption&gt;image&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;It lets you quickly send a link to the share screen. It then lets you quickly open the reader view in omnivore, or dismiss the pop up and return to your original app.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;image&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1284px) 1284px, 100vw&quot; width=&quot;1284&quot; height=&quot;2778&quot; src=&quot;https://briansunter.com/_astro/image_1662086894879_0.DTTxJ-gn_j0re8.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1662086894879_0.DTTxJ-gn_Z1i4arA.webp 640w, https://briansunter.com/_astro/image_1662086894879_0.DTTxJ-gn_N9tKM.webp 750w, https://briansunter.com/_astro/image_1662086894879_0.DTTxJ-gn_Z1W8dr0.webp 828w, https://briansunter.com/_astro/image_1662086894879_0.DTTxJ-gn_1dIW49.webp 1080w, https://briansunter.com/_astro/image_1662086894879_0.DTTxJ-gn_ZBLB27.webp 1280w, https://briansunter.com/_astro/image_1662086894879_0.DTTxJ-gn_j0re8.webp 1284w&quot; /&gt;&lt;figcaption&gt;image&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;It also lets you tag your links and search by tag.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;image&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1284px) 1284px, 100vw&quot; width=&quot;1284&quot; height=&quot;2778&quot; src=&quot;https://briansunter.com/_astro/image_1662086908493_0.BRWNJVkx_Z4PJg0.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1662086908493_0.BRWNJVkx_28i6Wo.webp 640w, https://briansunter.com/_astro/image_1662086908493_0.BRWNJVkx_ZPFmDa.webp 750w, https://briansunter.com/_astro/image_1662086908493_0.BRWNJVkx_1te3WY.webp 828w, https://briansunter.com/_astro/image_1662086908493_0.BRWNJVkx_ORKz1.webp 1080w, https://briansunter.com/_astro/image_1662086908493_0.BRWNJVkx_Z10CMwf.webp 1280w, https://briansunter.com/_astro/image_1662086908493_0.BRWNJVkx_Z4PJg0.webp 1284w&quot; /&gt;&lt;figcaption&gt;image&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;My new workflow is to discover content from reddit, hackernews, twitter, and blogs in inoreader, then send it to omnivore for reading and highlighting. From there, the links and highlights automatically wind up in my logseq graph and I can integrate them into my notes&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;image&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1284px) 1284px, 100vw&quot; width=&quot;1284&quot; height=&quot;2778&quot; src=&quot;https://briansunter.com/_astro/image_1662086941972_0.EtwcTpG9_1cqCBu.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1662086941972_0.EtwcTpG9_ZhgHME.webp 640w, https://briansunter.com/_astro/image_1662086941972_0.EtwcTpG9_1NVVpI.webp 750w, https://briansunter.com/_astro/image_1662086941972_0.EtwcTpG9_ZVkKM4.webp 828w, https://briansunter.com/_astro/image_1662086941972_0.EtwcTpG9_27a8rv.webp 1080w, https://briansunter.com/_astro/image_1662086941972_0.EtwcTpG9_gDzlf.webp 1280w, https://briansunter.com/_astro/image_1662086941972_0.EtwcTpG9_1cqCBu.webp 1284w&quot; /&gt;&lt;figcaption&gt;image&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Overall I couldn’t be happier to have a nice simple open source read it later app that integrates with logseq. It’s awesome that it supports the reader mode and highlights as well, which I use heavily. It has been great so far for optimizing my information diet.&lt;/p&gt;
&lt;p&gt;Go to &lt;a href=&quot;https://omnivore.app/&quot;&gt;Omnivore&lt;/a&gt; to get started!&lt;/p&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Soma Game Review</title><link>https://briansunter.com/soma</link><guid isPermaLink="true">https://briansunter.com/soma</guid><description>A sci-fi horror game that asks uncomfortable questions about consciousness and identity.</description><pubDate>Mon, 24 Oct 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/ss_21b43d4cb49ef3332eefbb4957ec96e075543ef1.1920x1080_1666656957286_0.1b5HeFvN_3lzD4.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;figure&gt;&lt;img alt=&quot;ss 21b43d4cb49ef3332eefbb4957ec96e075543ef1.1920x1080&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1920px) 1920px, 100vw&quot; width=&quot;1920&quot; height=&quot;1080&quot; src=&quot;https://briansunter.com/_astro/ss_21b43d4cb49ef3332eefbb4957ec96e075543ef1.1920x1080_1666656957286_0.1b5HeFvN_1HyCaQ.webp&quot; srcset=&quot;https://briansunter.com/_astro/ss_21b43d4cb49ef3332eefbb4957ec96e075543ef1.1920x1080_1666656957286_0.1b5HeFvN_2czax6.webp 640w, https://briansunter.com/_astro/ss_21b43d4cb49ef3332eefbb4957ec96e075543ef1.1920x1080_1666656957286_0.1b5HeFvN_Z1e9Dfr.webp 750w, https://briansunter.com/_astro/ss_21b43d4cb49ef3332eefbb4957ec96e075543ef1.1920x1080_1666656957286_0.1b5HeFvN_Zvs8l5.webp 828w, https://briansunter.com/_astro/ss_21b43d4cb49ef3332eefbb4957ec96e075543ef1.1920x1080_1666656957286_0.1b5HeFvN_Z27UOpW.webp 1080w, https://briansunter.com/_astro/ss_21b43d4cb49ef3332eefbb4957ec96e075543ef1.1920x1080_1666656957286_0.1b5HeFvN_Z1Mk1al.webp 1280w, https://briansunter.com/_astro/ss_21b43d4cb49ef3332eefbb4957ec96e075543ef1.1920x1080_1666656957286_0.1b5HeFvN_odnsy.webp 1668w, https://briansunter.com/_astro/ss_21b43d4cb49ef3332eefbb4957ec96e075543ef1.1920x1080_1666656957286_0.1b5HeFvN_1HyCaQ.webp 1920w&quot; /&gt;&lt;figcaption&gt;ss 21b43d4cb49ef3332eefbb4957ec96e075543ef1.1920x1080&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h3&gt;What’s it about?&lt;/h3&gt;
&lt;p&gt;You go in for a brain scan, and wake up on a creepy underwater laboratory. You explore trying to figure out what happened to all the people, how you got there, and why there are scary monsters running around.&lt;/p&gt;
&lt;h3&gt;Who would like it?&lt;/h3&gt;
&lt;p&gt;People who like exploration games, moderately scary horror, and philosophical science fiction&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;ss f72532983850e64b32428fd0e4b09e0ff8fcfc55.1920x1080&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1920px) 1920px, 100vw&quot; width=&quot;1920&quot; height=&quot;1080&quot; src=&quot;https://briansunter.com/_astro/ss_f72532983850e64b32428fd0e4b09e0ff8fcfc55.1920x1080_1666657031280_0.BiB1GuUg_1n1cdH.webp&quot; srcset=&quot;https://briansunter.com/_astro/ss_f72532983850e64b32428fd0e4b09e0ff8fcfc55.1920x1080_1666657031280_0.BiB1GuUg_ZAbU7X.webp 640w, https://briansunter.com/_astro/ss_f72532983850e64b32428fd0e4b09e0ff8fcfc55.1920x1080_1666657031280_0.BiB1GuUg_13goSq.webp 750w, https://briansunter.com/_astro/ss_f72532983850e64b32428fd0e4b09e0ff8fcfc55.1920x1080_1666657031280_0.BiB1GuUg_1KWTMM.webp 828w, https://briansunter.com/_astro/ss_f72532983850e64b32428fd0e4b09e0ff8fcfc55.1920x1080_1666657031280_0.BiB1GuUg_Z2stfn6.webp 1080w, https://briansunter.com/_astro/ss_f72532983850e64b32428fd0e4b09e0ff8fcfc55.1920x1080_1666657031280_0.BiB1GuUg_Z27Rr7u.webp 1280w, https://briansunter.com/_astro/ss_f72532983850e64b32428fd0e4b09e0ff8fcfc55.1920x1080_1666657031280_0.BiB1GuUg_3EWvp.webp 1668w, https://briansunter.com/_astro/ss_f72532983850e64b32428fd0e4b09e0ff8fcfc55.1920x1080_1666657031280_0.BiB1GuUg_1n1cdH.webp 1920w&quot; /&gt;&lt;figcaption&gt;ss f72532983850e64b32428fd0e4b09e0ff8fcfc55.1920x1080&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h3&gt;What is the gameplay like?&lt;/h3&gt;
&lt;p&gt;It’s a first person game where you explore, find puzzles and clues, and try to hide from the monsters chasing you.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;ss 5ee5231b847ec7397554af8b2efe25caeef5d7c5.1920x1080&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1520px) 1520px, 100vw&quot; width=&quot;1520&quot; height=&quot;900&quot; src=&quot;https://briansunter.com/_astro/ss_5ee5231b847ec7397554af8b2efe25caeef5d7c5.1920x1080_1666657010705_0.JyzEmFQB_18s0Gh.webp&quot; srcset=&quot;https://briansunter.com/_astro/ss_5ee5231b847ec7397554af8b2efe25caeef5d7c5.1920x1080_1666657010705_0.JyzEmFQB_23nKL9.webp 640w, https://briansunter.com/_astro/ss_5ee5231b847ec7397554af8b2efe25caeef5d7c5.1920x1080_1666657010705_0.JyzEmFQB_ZvO1JY.webp 750w, https://briansunter.com/_astro/ss_5ee5231b847ec7397554af8b2efe25caeef5d7c5.1920x1080_1666657010705_0.JyzEmFQB_Z1apPIF.webp 828w, https://briansunter.com/_astro/ss_5ee5231b847ec7397554af8b2efe25caeef5d7c5.1920x1080_1666657010705_0.JyzEmFQB_Z1ySnlJ.webp 1080w, https://briansunter.com/_astro/ss_5ee5231b847ec7397554af8b2efe25caeef5d7c5.1920x1080_1666657010705_0.JyzEmFQB_ZogOHJ.webp 1280w, https://briansunter.com/_astro/ss_5ee5231b847ec7397554af8b2efe25caeef5d7c5.1920x1080_1666657010705_0.JyzEmFQB_18s0Gh.webp 1520w&quot; /&gt;&lt;figcaption&gt;ss 5ee5231b847ec7397554af8b2efe25caeef5d7c5.1920x1080&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h3&gt;Does one specific element of the game stand out to you?&lt;/h3&gt;
&lt;p&gt;The story is deep and captivating. I loved reading all the clues and lore to learn more about the game’s history.&lt;/p&gt;
&lt;h3&gt;What elements did you like?&lt;/h3&gt;
&lt;p&gt;It’s a great mix of exploration and puzzle solving, with bursts of scariness&lt;/p&gt;
&lt;p&gt;I like how it gradually reveals the mystery to you and it feels like you’re unravelling it. I couldn’t predict where the story was going and I was engaged until the end.&lt;/p&gt;
&lt;p&gt;Impressive graphics, especially for an indie game&lt;/p&gt;
&lt;p&gt;Good difficulty level for the puzzles. Sometimes I had to backtrack and think, but I didn’t get stuck very often.&lt;/p&gt;
&lt;p&gt;Satisfying ending&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;ss e19b8e8b9b453aff00651ebd3e8a2639b581bc73.1920x1080&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1920px) 1920px, 100vw&quot; width=&quot;1920&quot; height=&quot;1080&quot; src=&quot;https://briansunter.com/_astro/ss_e19b8e8b9b453aff00651ebd3e8a2639b581bc73.1920x1080_1666657048460_0.DAeMxrGL_Z1YmiSY.webp&quot; srcset=&quot;https://briansunter.com/_astro/ss_e19b8e8b9b453aff00651ebd3e8a2639b581bc73.1920x1080_1666657048460_0.DAeMxrGL_ZGO40l.webp 640w, https://briansunter.com/_astro/ss_e19b8e8b9b453aff00651ebd3e8a2639b581bc73.1920x1080_1666657048460_0.DAeMxrGL_VDg13.webp 750w, https://briansunter.com/_astro/ss_e19b8e8b9b453aff00651ebd3e8a2639b581bc73.1920x1080_1666657048460_0.DAeMxrGL_1EkKUp.webp 828w, https://briansunter.com/_astro/ss_e19b8e8b9b453aff00651ebd3e8a2639b581bc73.1920x1080_1666657048460_0.DAeMxrGL_ZJEBFQ.webp 1080w, https://briansunter.com/_astro/ss_e19b8e8b9b453aff00651ebd3e8a2639b581bc73.1920x1080_1666657048460_0.DAeMxrGL_Zp3Nqf.webp 1280w, https://briansunter.com/_astro/ss_e19b8e8b9b453aff00651ebd3e8a2639b581bc73.1920x1080_1666657048460_0.DAeMxrGL_1LtAcE.webp 1668w, https://briansunter.com/_astro/ss_e19b8e8b9b453aff00651ebd3e8a2639b581bc73.1920x1080_1666657048460_0.DAeMxrGL_Z1YmiSY.webp 1920w&quot; /&gt;&lt;figcaption&gt;ss e19b8e8b9b453aff00651ebd3e8a2639b581bc73.1920x1080&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h3&gt;What elements did you dislike?&lt;/h3&gt;
&lt;p&gt;Sometimes it’s pretty unclear what you need to do. Sometimes you just need to plug in a nondescript hose, which wasn’t obvious. I had to look up a guide a couple times&lt;/p&gt;
&lt;p&gt;The monsters can be a little bit buggy, sometimes they would spawn in an incredibly inconvenient place that would force me to restart the game&lt;/p&gt;
&lt;p&gt;There could be more variety in the scenery. The underwater labs blended together&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;ss d2fa7284b9610be9655700c6fa60bf44f7affce8.1920x1080&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1920px) 1920px, 100vw&quot; width=&quot;1920&quot; height=&quot;1080&quot; src=&quot;https://briansunter.com/_astro/ss_d2fa7284b9610be9655700c6fa60bf44f7affce8.1920x1080_1666657065284_0.BP_faPob_rCnfU.webp&quot; srcset=&quot;https://briansunter.com/_astro/ss_d2fa7284b9610be9655700c6fa60bf44f7affce8.1920x1080_1666657065284_0.BP_faPob_2k6al6.webp 640w, https://briansunter.com/_astro/ss_d2fa7284b9610be9655700c6fa60bf44f7affce8.1920x1080_1666657065284_0.BP_faPob_Z16CDrr.webp 750w, https://briansunter.com/_astro/ss_d2fa7284b9610be9655700c6fa60bf44f7affce8.1920x1080_1666657065284_0.BP_faPob_ZnV8x5.webp 828w, https://briansunter.com/_astro/ss_d2fa7284b9610be9655700c6fa60bf44f7affce8.1920x1080_1666657065284_0.BP_faPob_1Gk4t3.webp 1080w, https://briansunter.com/_astro/ss_d2fa7284b9610be9655700c6fa60bf44f7affce8.1920x1080_1666657065284_0.BP_faPob_21URIE.webp 1280w, https://briansunter.com/_astro/ss_d2fa7284b9610be9655700c6fa60bf44f7affce8.1920x1080_1666657065284_0.BP_faPob_ZQHQrn.webp 1668w, https://briansunter.com/_astro/ss_d2fa7284b9610be9655700c6fa60bf44f7affce8.1920x1080_1666657065284_0.BP_faPob_rCnfU.webp 1920w&quot; /&gt;&lt;figcaption&gt;ss d2fa7284b9610be9655700c6fa60bf44f7affce8.1920x1080&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h3&gt;How does the game compare to similar games?&lt;/h3&gt;
&lt;p&gt;Frictional games has a similar game called Amnesia, which is also excellent. Soma is even better, since it’s more polished and has great modern graphics&lt;/p&gt;
&lt;p&gt;It’s like resident evil, where you’re trying to escape buildings with zombies wandering around. It’s much less intense and action oriented than resident evil though&lt;/p&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Algorithms and Data Structures</title><link>https://briansunter.com/algorithms</link><guid isPermaLink="true">https://briansunter.com/algorithms</guid><description>My notes on algorithms and data structures, from Big O basics to heaps and sorting.</description><pubDate>Tue, 04 Oct 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/Screenshot_2022-12-07_at_12.29.34_PM_1670452221345_0.CfFaK-kW_1n9vG6.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;p&gt;A collection of notes on fundamental algorithms and data structures, covering time complexity analysis, sorting, searching, heaps, and more.&lt;/p&gt;
&lt;h2&gt;Foundations&lt;/h2&gt;
&lt;h3&gt;time-complexity|Time Complexity&lt;/h3&gt;
&lt;p&gt;Understanding how to analyze algorithm efficiency.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;What is an algorithm?&lt;/li&gt;
&lt;li&gt;posteriori-vs-a-priori-analysis-of-algorithms|A Priori vs A Posteriori Analysis&lt;/li&gt;
&lt;li&gt;Frequency count method&lt;/li&gt;
&lt;li&gt;Asymptotic notation: Big O, Omega, and Theta&lt;/li&gt;
&lt;li&gt;Best, worst, and average case analysis&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;recurrence-relation-masters-theorem-subtracting|Recurrence Relations (Subtracting Functions)&lt;/h3&gt;
&lt;p&gt;Analyzing algorithms where subproblems reduce by &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6667em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;b&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Divide and conquer introduction&lt;/li&gt;
&lt;li&gt;Substitution method&lt;/li&gt;
&lt;li&gt;Tree method&lt;/li&gt;
&lt;li&gt;Master’s Theorem for &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;b&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1076em&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;recurrence-relation-masters-theorem-dividing|Recurrence Relations (Dividing Functions)&lt;/h3&gt;
&lt;p&gt;Analyzing algorithms where subproblems reduce by &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;b&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Substitution method&lt;/li&gt;
&lt;li&gt;Tree method&lt;/li&gt;
&lt;li&gt;Master’s Theorem for &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.095em;vertical-align:-0.345em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1389em&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mopen nulldelimiter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.6954em&quot;&gt;&lt;span style=&quot;top:-2.655em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;b&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.23em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line&quot; style=&quot;border-bottom-width:0.04em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.394em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.345em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1076em&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Searching&lt;/h2&gt;
&lt;h3&gt;binary-search|Binary Search&lt;/h3&gt;
&lt;p&gt;Efficient searching in sorted arrays with &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; time complexity.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Iterative implementation&lt;/li&gt;
&lt;li&gt;Recursive implementation&lt;/li&gt;
&lt;li&gt;Common variations and edge cases&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Data Structures&lt;/h2&gt;
&lt;h3&gt;heap|Heap&lt;/h3&gt;
&lt;p&gt;A complete binary tree that satisfies the heap property.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Array representation of binary trees&lt;/li&gt;
&lt;li&gt;Complete vs full binary trees&lt;/li&gt;
&lt;li&gt;Min heap and max heap&lt;/li&gt;
&lt;li&gt;Insertion and deletion&lt;/li&gt;
&lt;li&gt;Heap sort&lt;/li&gt;
&lt;li&gt;Heapify&lt;/li&gt;
&lt;li&gt;Priority queues&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Sorting&lt;/h2&gt;
&lt;h3&gt;Merge Sort&lt;/h3&gt;
&lt;p&gt;A divide-and-conquer sorting algorithm with &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; time complexity.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Two-way merge&lt;/li&gt;
&lt;li&gt;K-way merge&lt;/li&gt;
&lt;li&gt;Iterative merge sort&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Quick Sort&lt;/h3&gt;
&lt;p&gt;An efficient in-place sorting algorithm with average &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; time complexity.&lt;/p&gt;
&lt;h2&gt;More Resources&lt;/h2&gt;
&lt;p&gt;See also my data-structures-algorithms-guide|Data Structures and Algorithms Guide for a comprehensive overview of topics and problems.&lt;/p&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>My Game Review Template</title><link>https://briansunter.com/game-review-template</link><guid isPermaLink="true">https://briansunter.com/game-review-template</guid><description>A structured template I use to write thoughtful video game reviews.</description><pubDate>Tue, 04 Oct 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;I like writing down my thoughts after finishing a game. If I don’t, I forget the details surprisingly fast. After a few months, all I can remember is “yeah, that was pretty good” which isn’t very useful.&lt;/p&gt;
&lt;p&gt;So I made this template. It forces me to actually think about what I played instead of just moving on to the next thing.&lt;/p&gt;
&lt;h2&gt;The Template&lt;/h2&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;markdown&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF;font-weight:bold&quot;&gt;## Game Review: [&lt;/span&gt;&lt;span style=&quot;color:#DBEDFF;text-decoration:underline&quot;&gt;Title&lt;/span&gt;&lt;span style=&quot;color:#79B8FF;font-weight:bold&quot;&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF;font-weight:bold&quot;&gt;### What&apos;s it about?&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF;font-weight:bold&quot;&gt;### Who would like it?&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF;font-weight:bold&quot;&gt;### What is the gameplay like?&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF;font-weight:bold&quot;&gt;### Does one specific element stand out?&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF;font-weight:bold&quot;&gt;### What elements did you like?&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF;font-weight:bold&quot;&gt;### What elements did you dislike?&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF;font-weight:bold&quot;&gt;### How does it compare to similar games?&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF;font-weight:bold&quot;&gt;### Final thoughts&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h2&gt;What each section is for&lt;/h2&gt;
&lt;h3&gt;What’s it about?&lt;/h3&gt;
&lt;p&gt;Just the basics. What’s the setting, what’s the story setup. I keep it vague to avoid spoilers. Mostly this is so I can remember “oh right, that was the one with the time loop” or whatever.&lt;/p&gt;
&lt;h3&gt;Who would like it?&lt;/h3&gt;
&lt;p&gt;This one’s actually the most useful part. “It’s good” doesn’t tell anyone anything. But “if you liked Hollow Knight you’ll probably like this” or “great if you want something relaxing after work” gives people something to work with.&lt;/p&gt;
&lt;h3&gt;What is the gameplay like?&lt;/h3&gt;
&lt;p&gt;How does it feel to actually play? Is it twitchy? Slow and methodical? Did I play it in long sessions or short bursts? How long did it take to finish?&lt;/p&gt;
&lt;h3&gt;Does one specific element stand out?&lt;/h3&gt;
&lt;p&gt;Some games have that one thing you remember forever. The soundtrack, a plot twist, a boss fight, the art style. If something stuck with me, I write it down here.&lt;/p&gt;
&lt;h3&gt;What elements did you like?&lt;/h3&gt;
&lt;p&gt;What worked. I try to be specific instead of generic stuff like “good graphics.”&lt;/p&gt;
&lt;h3&gt;What elements did you dislike?&lt;/h3&gt;
&lt;p&gt;What didn’t work. Even games I love have annoying parts. Being honest here helps me remember the full picture and helps anyone reading know what they’re getting into.&lt;/p&gt;
&lt;h3&gt;How does it compare to similar games?&lt;/h3&gt;
&lt;p&gt;A game can be mediocre compared to the best in its genre but still worth playing. Or it might be technically impressive but worse than a ten year old game in the same genre. Comparisons give context.&lt;/p&gt;
&lt;h3&gt;Final thoughts&lt;/h3&gt;
&lt;p&gt;Quick wrap-up. Would I recommend it? To who?&lt;/p&gt;
&lt;h2&gt;Why bother?&lt;/h2&gt;
&lt;p&gt;Mostly for myself. It’s nice to look back at what I played and actually remember my opinions. The template keeps me from rambling and makes sure I don’t skip anything important.&lt;/p&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Intro to Algorithms</title><link>https://briansunter.com/intro-to-algorithms</link><guid isPermaLink="true">https://briansunter.com/intro-to-algorithms</guid><description>What algorithms are, why they matter, and how to start thinking about problem solving.</description><pubDate>Tue, 04 Oct 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/image_1662087569135_0.D0aoFywA_Z2cFB4k.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;What is an algorithm?&lt;/h2&gt;
&lt;p&gt;An algorithm is a &lt;strong&gt;sequence of steps to solve a problem&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;That’s it. Nothing fancy. In computer science, we write these steps in code so a computer can follow them. Once we’ve written the algorithm, the computer runs it and solves the problem for us.&lt;/p&gt;
&lt;p&gt;Say we want to sort a list of numbers. We write an algorithm to do the sorting, and the computer turns &lt;code&gt;[5, 2, 3, 4, 1]&lt;/code&gt; into &lt;code&gt;[1, 2, 3, 4, 5]&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Algorithms go hand in hand with “data structures,” which is how we organize data in memory. An array, for example, stores items in a specific order so we can access them by position.&lt;/p&gt;
&lt;h2&gt;Real world algorithms&lt;/h2&gt;
&lt;p&gt;Algorithms aren’t just a computer science thing. They’re everywhere.&lt;/p&gt;
&lt;h3&gt;Recipes are algorithms&lt;/h3&gt;
&lt;p&gt;A recipe is just an algorithm for cooking. It’s a list of steps that anyone can follow to make the same dish.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Image credit: &lt;a href=&quot;https://www.behance.net/gallery/95101957/Desserts-recipes-in-infographics?locale=fi_FI&quot;&gt;seuraa&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h3&gt;Cookware as data structures&lt;/h3&gt;
&lt;figure&gt;&lt;img src=&quot;https://images.unsplash.com/photo-1584990347955-2ec0431a6e8f?crop=entropy&amp;amp;cs=tinysrgb&amp;amp;fit=max&amp;amp;fm=jpg&amp;amp;ixid=MnwyNDYwNDl8MHwxfHNlYXJjaHw4fHxjb29rd2FyZXxlbnwwfHx8fDE2NTc5Mjc5MTQ&amp;amp;ixlib=rb-1.2.1&amp;amp;q=80&amp;amp;w=400&quot; alt=&quot;person cooking on stainless steel cooking pot&quot; /&gt;&lt;figcaption&gt;person cooking on stainless steel cooking pot&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Data structures store and organize the data an algorithm needs. In cooking, that’s your cookware: pans, bowls, the stovetop itself. You use them to hold and access ingredients as you work through the recipe.&lt;/p&gt;
&lt;h2&gt;Algorithms vs heuristics&lt;/h2&gt;
&lt;p&gt;A heuristic is like an algorithm’s looser cousin. It gives you a general approach but doesn’t guarantee the exact same result every time.&lt;/p&gt;
&lt;p&gt;The “no-recipe recipe” trend is a good example. Instead of exact measurements and times, you get a rough outline: “some garlic, a splash of oil, roast until crispy.” The outcome varies based on your interpretation.&lt;/p&gt;
&lt;h3&gt;No-recipe recipe example&lt;/h3&gt;
&lt;p&gt;Here’s a bulgogi-style tofu recipe that reads more like a heuristic than an algorithm:&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;image&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 600px) 600px, 100vw&quot; width=&quot;600&quot; height=&quot;400&quot; src=&quot;https://briansunter.com/_astro/image_1662087583121_0.Civ0w8CM_Z1vVKIO.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1662087583121_0.Civ0w8CM_Z1vVKIO.webp 600w&quot; /&gt;&lt;figcaption&gt;image&lt;/figcaption&gt;&lt;/figure&gt;
&lt;blockquote&gt;
&lt;p&gt;Press some firm tofu to extract as much liquid as you can. Make a marinade of soy sauce, brown sugar, sesame oil, minced garlic, grated ginger, a spoonful of gochujang, a splash of neutral oil, some sliced scallions and toasted sesame seeds. Slice the tofu into bite-size cubes, and slide them into the marinade. Let that sit. A half-hour works; a few hours works better. Then roast them in a hot oven on an oiled foil-lined pan until they’re crisp.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;No exact amounts. No specific temperatures. The result depends on how you fill in the blanks.&lt;/p&gt;
&lt;h2&gt;Algorithm efficiency&lt;/h2&gt;
&lt;p&gt;Different algorithms can solve the same problem, but some are faster than others. A big part of programming is picking the right approach.&lt;/p&gt;
&lt;h3&gt;Mise en place&lt;/h3&gt;
&lt;figure&gt;&lt;img alt=&quot;image&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1000px) 1000px, 100vw&quot; width=&quot;1000&quot; height=&quot;667&quot; src=&quot;https://briansunter.com/_astro/image_1662087595225_0.BpulZS8o_qv5HC.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1662087595225_0.BpulZS8o_21smlc.webp 640w, https://briansunter.com/_astro/image_1662087595225_0.BpulZS8o_Zw4yoY.webp 750w, https://briansunter.com/_astro/image_1662087595225_0.BpulZS8o_OC3UI.webp 828w, https://briansunter.com/_astro/image_1662087595225_0.BpulZS8o_qv5HC.webp 1000w&quot; /&gt;&lt;figcaption&gt;image&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;em&gt;Image credit: &lt;a href=&quot;https://icenetblog.royalcollege.ca/about/about-the-editors/&quot;&gt;Michael A. Gisondi&lt;/a&gt; (&lt;a href=&quot;https://twitter.com/MikeGisondi&quot;&gt;@MikeGisondi&lt;/a&gt;)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;“Mise en place” is a French cooking term for preparing everything before you start. You chop your vegetables, measure your spices, and set out your tools. The actual cooking goes faster because you’re not scrambling mid-recipe.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;5 steps of mise en place:&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Know your recipe: ingredients, cookware, temperatures, cook times&lt;/li&gt;
&lt;li&gt;Prepare your ingredients: clean, debone, chop, mince&lt;/li&gt;
&lt;li&gt;Arrange your ingredients: appropriate size bowls, positioned logically&lt;/li&gt;
&lt;li&gt;Prepare your workstation: set the oven temperature, clean the area&lt;/li&gt;
&lt;li&gt;Arrange your tools: prepare cookware and necessary equipment&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The same principle applies to algorithms. Organizing your data ahead of time makes the actual computation faster.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Algorithm mise en place:&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Know your algorithms: use case, possible approaches, tradeoffs&lt;/li&gt;
&lt;li&gt;Prepare your data: understand input format, validate, convert&lt;/li&gt;
&lt;li&gt;Arrange your data: use appropriate data structures&lt;/li&gt;
&lt;li&gt;Prepare your workstation: set up project, repo, editor, IDE&lt;/li&gt;
&lt;li&gt;Arrange your tools: set up test runners and other utilities&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Sorting: a concrete example&lt;/h2&gt;
&lt;p&gt;Sorting is one of the most common algorithm categories. Given a list like &lt;code&gt;[5, 3, 1, 4, 2]&lt;/code&gt;, a sorting algorithm rearranges it into &lt;code&gt;[1, 2, 3, 4, 5]&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;There are many sorting algorithms (bubble sort, merge sort, quicksort) and they differ significantly in speed. Bubble sort is easy to understand but slow. Quicksort is more complex but much faster for large lists.&lt;/p&gt;
&lt;h3&gt;How bubble sort works&lt;/h3&gt;
&lt;p&gt;Bubble sort repeatedly compares adjacent elements and swaps them if they’re in the wrong order. It keeps passing through the list until everything is sorted.&lt;/p&gt;
&lt;p&gt;It’s called “bubble sort” because larger values gradually “bubble up” to the end of the list.&lt;/p&gt;
&lt;h3&gt;Diagram&lt;/h3&gt;
&lt;figure&gt;&lt;img alt=&quot;image&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1024px) 1024px, 100vw&quot; width=&quot;1024&quot; height=&quot;683&quot; src=&quot;https://briansunter.com/_astro/image_1662087609939_0.BOpjwZ1m_ZKAI8c.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1662087609939_0.BOpjwZ1m_ZJma00.webp 640w, https://briansunter.com/_astro/image_1662087609939_0.BOpjwZ1m_1Mi33K.webp 750w, https://briansunter.com/_astro/image_1662087609939_0.BOpjwZ1m_Z1Vcspt.webp 828w, https://briansunter.com/_astro/image_1662087609939_0.BOpjwZ1m_ZKAI8c.webp 1024w&quot; /&gt;&lt;figcaption&gt;image&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;em&gt;Diagram credit: &lt;a href=&quot;https://www.productplan.com/glossary/bubble-sort/&quot;&gt;ProductPlan&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h3&gt;Code&lt;/h3&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;typescript&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;/**&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt; * Bubble Sort is a simple sorting algorithm that works by repeatedly&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt; * swapping adjacent elements if they are in the wrong order.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt; * This implementation is in-place but not efficient.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt; * &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;@param&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; input&lt;/span&gt;&lt;span style=&quot;color:#6A737D&quot;&gt; - The array to be sorted&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt; * &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;@returns&lt;/span&gt;&lt;span style=&quot;color:#6A737D&quot;&gt; The sorted array&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt; */&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; bubbleSort&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; number&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;[])&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; number&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;[] {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;  // for every element in the array&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;  for&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;let&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; i &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 0&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;; i &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; input.&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;length&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;; i&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;++&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;    // compare the current element with the next element&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;    for&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;let&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; j &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 0&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;; j &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; input.&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;length&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;; j&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;++&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;      // if the current element is greater than the next element&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;      if&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (input[j] &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; input[j &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 1&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;]) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;        // swap the two elements&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;        const&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; temp&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; input[j];&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;        input[j] &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; input[j &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 1&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;];&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;        input[j &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 1&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;] &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; temp;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;      }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;  return&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; input;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;export&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; { bubbleSort };&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;export&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; default&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; bubbleSort;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;In practice, you’d use a faster algorithm like quicksort or mergesort. Bubble sort is mostly useful for learning.&lt;/p&gt;
&lt;h2&gt;Wrapping up&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Algorithms&lt;/strong&gt; are step-by-step instructions for solving problems&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Heuristics&lt;/strong&gt; are less precise approaches that don’t guarantee exact results&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Data structures&lt;/strong&gt; organize the data your algorithms work with&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Efficiency matters&lt;/strong&gt;: different algorithms can produce the same result at very different speeds&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For a deeper dive into measuring algorithm speed, check out my notes on time-complexity|time complexity.&lt;/p&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Logseq Getting Started</title><link>https://briansunter.com/logseq-getting-started</link><guid isPermaLink="true">https://briansunter.com/logseq-getting-started</guid><description>How to get started with Logseq and publish your notes online in 30 minutes.</description><pubDate>Tue, 04 Oct 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/image_1662087082755_0.BCcfoMhk_2qdy1.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://logseq.com/&quot;&gt;Logseq&lt;/a&gt; is a free open source notetaking tool that makes it easy to share your notes online. I’ll show you how to get set up quickly.&lt;/p&gt;
&lt;p&gt;Here’s what we’ll cover:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Download Logseq&lt;/li&gt;
&lt;li&gt;Start taking notes in your daily notes&lt;/li&gt;
&lt;li&gt;Create pages using backlinks (surrounded with double square brackets like &lt;code&gt;[[backlink]]&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Make a few pages public&lt;/li&gt;
&lt;li&gt;Share your pages with the world&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I’ll use &lt;a href=&quot;https://netlify.com/&quot;&gt;Netlify&lt;/a&gt; as the hosting example because it’s free and easy to get started. Logseq generates a site that works with many hosting providers, so you can switch later if you want. I recommend getting something basic online first, then exploring other options.&lt;/p&gt;
&lt;h2&gt;Download Logseq&lt;/h2&gt;
&lt;p&gt;Download Logseq from the &lt;a href=&quot;https://github.com/logseq/logseq/releases&quot;&gt;releases page on GitHub&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Find the release tagged “Latest” (not “Pre-release”) and pick the right version for your system: darwin-arm for M1/M2 Mac, darwin-x64 for Intel Mac, or the Windows version.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;image&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 654px) 654px, 100vw&quot; width=&quot;654&quot; height=&quot;856&quot; src=&quot;https://briansunter.com/_astro/image_1662087068660_0.BDQB3eyr_Wk8vh.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1662087068660_0.BDQB3eyr_Z24kco7.webp 640w, https://briansunter.com/_astro/image_1662087068660_0.BDQB3eyr_Wk8vh.webp 654w&quot; /&gt;&lt;figcaption&gt;image&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2&gt;Set up Logseq&lt;/h2&gt;
&lt;p&gt;After installing and opening Logseq, you’ll see this page:&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;image&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 2034px) 2034px, 100vw&quot; width=&quot;2034&quot; height=&quot;1964&quot; src=&quot;https://briansunter.com/_astro/image_1662087082755_0.BCcfoMhk_201nK.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1662087082755_0.BCcfoMhk_4CF7m.webp 640w, https://briansunter.com/_astro/image_1662087082755_0.BCcfoMhk_a6f3O.webp 750w, https://briansunter.com/_astro/image_1662087082755_0.BCcfoMhk_ZsP8K2.webp 828w, https://briansunter.com/_astro/image_1662087082755_0.BCcfoMhk_1CbbVy.webp 1080w, https://briansunter.com/_astro/image_1662087082755_0.BCcfoMhk_1RHeVg.webp 1280w, https://briansunter.com/_astro/image_1662087082755_0.BCcfoMhk_7GjWR.webp 1668w, https://briansunter.com/_astro/image_1662087082755_0.BCcfoMhk_201nK.webp 2034w&quot; /&gt;&lt;figcaption&gt;image&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Create a folder called &lt;code&gt;Logseq&lt;/code&gt; in iCloud Drive, then make a subfolder for your graph (something like &lt;code&gt;notes&lt;/code&gt;). Using iCloud Drive means your notes will sync to the mobile app.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;image&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1576px) 1576px, 100vw&quot; width=&quot;1576&quot; height=&quot;888&quot; src=&quot;https://briansunter.com/_astro/image_1662087093541_0.BOk82s8k_Z1aJpSV.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1662087093541_0.BOk82s8k_Z27wfvI.webp 640w, https://briansunter.com/_astro/image_1662087093541_0.BOk82s8k_1WFoxn.webp 750w, https://briansunter.com/_astro/image_1662087093541_0.BOk82s8k_e8TRC.webp 828w, https://briansunter.com/_astro/image_1662087093541_0.BOk82s8k_Z238qLN.webp 1080w, https://briansunter.com/_astro/image_1662087093541_0.BOk82s8k_21791I.webp 1280w, https://briansunter.com/_astro/image_1662087093541_0.BOk82s8k_Z1aJpSV.webp 1576w&quot; /&gt;&lt;figcaption&gt;image&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2&gt;Start writing in daily notes&lt;/h2&gt;
&lt;p&gt;You’ll see an empty page with today’s date. This is your “daily notes” page. It’s usually my starting place for ideas. I type some thoughts and create &lt;code&gt;[[backlinks]]&lt;/code&gt; for important concepts so I can find my notes later when writing or researching.&lt;/p&gt;
&lt;p&gt;Spend some time experimenting: write some notes, make backlinks, click the backlinks to see how pages connect.&lt;/p&gt;

  &lt;div class=&quot;not-prose tweet-embed&quot;&gt;
    &lt;div class=&quot;tweet-card&quot;&gt;
      &lt;a href=&quot;https://twitter.com/Conaw/status/1315078546763603968&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;&lt;/a&gt;
      &lt;div class=&quot;tweet-header&quot;&gt;
        &lt;div class=&quot;tweet-author&quot;&gt;
          &lt;img src=&quot;https://pbs.twimg.com/profile_images/1327975905780670464/gbBmU0Gf_normal.jpg&quot; alt=&quot;Conor&apos;s avatar&quot; /&gt;
          &lt;div class=&quot;tweet-author-info&quot;&gt;
            &lt;a href=&quot;https://twitter.com/Conaw/status/1315078546763603968&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
              &lt;div class=&quot;tweet-author-name-row&quot;&gt;
                &lt;span class=&quot;tweet-author-name&quot;&gt;Conor&lt;/span&gt;
                

  


              &lt;/div&gt;
            &lt;/a&gt;
            &lt;span class=&quot;tweet-author-handle&quot;&gt;@Conaw&lt;/span&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;a href=&quot;https://twitter.com/Conaw/status/1315078546763603968&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;

  
    
  

&lt;/a&gt;
      &lt;/div&gt;
      
      &lt;div class=&quot;tweet-body&quot;&gt;&lt;a href=&quot;https://twitter.com/activatelearn&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;@activatelearn&lt;/a&gt; &lt;a href=&quot;https://twitter.com/rosiesherry&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;@rosiesherry&lt;/a&gt; &lt;a href=&quot;https://twitter.com/RoamResearch&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;@RoamResearch&lt;/a&gt; You don&apos;t need to learn anything besides writing a few words you think are important in [[these brackets]], and hitting tab.

The rest is just folks getting excited and building on that foundation.

Very easy gateway, and many very capable people never feel need to go beyond.&lt;/div&gt;
      
      
      &lt;a href=&quot;https://twitter.com/Conaw/status/1315078546763603968&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
        &lt;span class=&quot;tweet-timestamp&quot;&gt;Oct 10, 2020, 11:55 PM&lt;/span&gt;
      &lt;/a&gt;
      &lt;hr /&gt;
      &lt;div class=&quot;tweet-actions&quot;&gt;
        &lt;div class=&quot;tweet-action tweet-action-like&quot;&gt;
          

  
    
  


          &lt;span&gt;426&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class=&quot;tweet-action tweet-action-reply&quot;&gt;
          

  
    
  


          &lt;span&gt;31&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  
&lt;h2&gt;Make your public homepage&lt;/h2&gt;
&lt;p&gt;Now let’s create a home for you on the internet.&lt;/p&gt;
&lt;p&gt;Create a homepage by typing &lt;code&gt;[[homepage]]&lt;/code&gt; then clicking on it. This creates the page and navigates you to it.&lt;/p&gt;
&lt;p&gt;Write some text about yourself and your interests.&lt;/p&gt;
&lt;p&gt;Make it public by clicking the three dots in the upper right corner and selecting “Make it public for publishing.”&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;image&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 560px) 560px, 100vw&quot; width=&quot;560&quot; height=&quot;1424&quot; src=&quot;https://briansunter.com/_astro/image_1662087105153_0.FHKciR-s_rRbe9.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1662087105153_0.FHKciR-s_rRbe9.webp 560w&quot; /&gt;&lt;figcaption&gt;image&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Only the pages you mark as public will be published. You can keep most of your graph private with just a few pages visible to the world. Remember to select this option on each page you want to publish.&lt;/p&gt;
&lt;h2&gt;Export your public graph&lt;/h2&gt;
&lt;h3&gt;Set your homepage&lt;/h3&gt;
&lt;p&gt;Logseq has a concept of a “home page” that loads when you open the app.&lt;/p&gt;
&lt;p&gt;For private notetaking, I like my daily notes as the default. For my published site, I want the dedicated homepage we just created.&lt;/p&gt;
&lt;p&gt;To change this, we need to update the &lt;code&gt;:default-home&lt;/code&gt; setting before exporting.&lt;/p&gt;
&lt;p&gt;Click the three dots in the upper right corner, then select Settings. Choose “Edit config.edn.”&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;image&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1594px) 1594px, 100vw&quot; width=&quot;1594&quot; height=&quot;926&quot; src=&quot;https://briansunter.com/_astro/image_1662087114284_0.DQI3pxJc_1Nhhke.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1662087114284_0.DQI3pxJc_Z22NWO9.webp 640w, https://briansunter.com/_astro/image_1662087114284_0.DQI3pxJc_24F4yi.webp 750w, https://briansunter.com/_astro/image_1662087114284_0.DQI3pxJc_KgMnk.webp 828w, https://briansunter.com/_astro/image_1662087114284_0.DQI3pxJc_1kV11A.webp 1080w, https://briansunter.com/_astro/image_1662087114284_0.DQI3pxJc_FXvbo.webp 1280w, https://briansunter.com/_astro/image_1662087114284_0.DQI3pxJc_1Nhhke.webp 1594w&quot; /&gt;&lt;figcaption&gt;image&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Add a line to set your homepage:&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;image&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 858px) 858px, 100vw&quot; width=&quot;858&quot; height=&quot;372&quot; src=&quot;https://briansunter.com/_astro/image_1662087124359_0.CBaZRiWC_JntvJ.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1662087124359_0.CBaZRiWC_NscLc.webp 640w, https://briansunter.com/_astro/image_1662087124359_0.CBaZRiWC_faK2H.webp 750w, https://briansunter.com/_astro/image_1662087124359_0.CBaZRiWC_Z25W0Y4.webp 828w, https://briansunter.com/_astro/image_1662087124359_0.CBaZRiWC_JntvJ.webp 858w&quot; /&gt;&lt;figcaption&gt;image&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;This is a bit inconvenient to do each time you publish, but the overall experience is pretty good. I expect these publishing features will improve over time.&lt;/p&gt;
&lt;p&gt;When you’re ready to publish, click the three dots in the upper right corner, select “Export graph,” then “Export public pages.”&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;image&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1506px) 1506px, 100vw&quot; width=&quot;1506&quot; height=&quot;636&quot; src=&quot;https://briansunter.com/_astro/image_1662087133034_0.BS5qRzwc_Z8lLbm.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1662087133034_0.BS5qRzwc_2vS0Ym.webp 640w, https://briansunter.com/_astro/image_1662087133034_0.BS5qRzwc_Z25jVcK.webp 750w, https://briansunter.com/_astro/image_1662087133034_0.BS5qRzwc_Z1tjWcV.webp 828w, https://briansunter.com/_astro/image_1662087133034_0.BS5qRzwc_Z1SxIH9.webp 1080w, https://briansunter.com/_astro/image_1662087133034_0.BS5qRzwc_Lb3Tt.webp 1280w, https://briansunter.com/_astro/image_1662087133034_0.BS5qRzwc_Z8lLbm.webp 1506w&quot; /&gt;&lt;figcaption&gt;image&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Pick a memorable folder for the output.&lt;/p&gt;
&lt;p&gt;After exporting, comment out the default-home line with two semicolons &lt;code&gt;;;&lt;/code&gt; so your private journal goes back to using daily notes as the default page.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;image&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 858px) 858px, 100vw&quot; width=&quot;858&quot; height=&quot;372&quot; src=&quot;https://briansunter.com/_astro/image_1662087142333_0.B4IUkX6j_ZJOO3L.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1662087142333_0.B4IUkX6j_ZFK5Nj.webp 640w, https://briansunter.com/_astro/image_1662087142333_0.B4IUkX6j_Z1f2xwN.webp 750w, https://briansunter.com/_astro/image_1662087142333_0.B4IUkX6j_1u1Ofm.webp 828w, https://briansunter.com/_astro/image_1662087142333_0.B4IUkX6j_ZJOO3L.webp 858w&quot; /&gt;&lt;figcaption&gt;image&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2&gt;Publish your public graph online&lt;/h2&gt;
&lt;p&gt;There are many good options, but I recommend Netlify because it’s free and simple. You can always switch later.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://app.netlify.com/signup&quot;&gt;Sign up for Netlify here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;After signing in, go to &lt;a href=&quot;https://app.netlify.com/drop&quot;&gt;Netlify Drop&lt;/a&gt;.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;image&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1654px) 1654px, 100vw&quot; width=&quot;1654&quot; height=&quot;1405&quot; src=&quot;https://briansunter.com/_astro/image_1662087153089_0.Bg9v6e_Z_LKsav.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1662087153089_0.Bg9v6e_Z_Or2kC.webp 640w, https://briansunter.com/_astro/image_1662087153089_0.Bg9v6e_Z_22hbfF.webp 750w, https://briansunter.com/_astro/image_1662087153089_0.Bg9v6e_Z_1c77UF.webp 828w, https://briansunter.com/_astro/image_1662087153089_0.Bg9v6e_Z_S1f7L.webp 1080w, https://briansunter.com/_astro/image_1662087153089_0.Bg9v6e_Z_Z1qtPft.webp 1280w, https://briansunter.com/_astro/image_1662087153089_0.Bg9v6e_Z_LKsav.webp 1654w&quot; /&gt;&lt;figcaption&gt;image&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Click the folder icon and select the folder where you exported your public graph.&lt;/p&gt;
&lt;p&gt;In a few minutes you should be online!&lt;/p&gt;
&lt;p&gt;To update your site later, export your public graph again, then click the “Deploys” tab and upload the new version.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;image&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1186px) 1186px, 100vw&quot; width=&quot;1186&quot; height=&quot;948&quot; src=&quot;https://briansunter.com/_astro/image_1662087164166_0.Clj03C5T_Z2pakeN.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1662087164166_0.Clj03C5T_Ij9rI.webp 640w, https://briansunter.com/_astro/image_1662087164166_0.Clj03C5T_Z12tEfL.webp 750w, https://briansunter.com/_astro/image_1662087164166_0.Clj03C5T_Z1K4TJG.webp 828w, https://briansunter.com/_astro/image_1662087164166_0.Clj03C5T_wfc7L.webp 1080w, https://briansunter.com/_astro/image_1662087164166_0.Clj03C5T_Z2pakeN.webp 1186w&quot; /&gt;&lt;figcaption&gt;image&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2&gt;Next steps&lt;/h2&gt;
&lt;h3&gt;Set up a custom domain&lt;/h3&gt;
&lt;p&gt;I strongly recommend getting a custom domain like yourname.com.&lt;/p&gt;
&lt;p&gt;You want the links you share to work forever. If you own your domain, you can switch away from Netlify later. If all your links have netlify.app in the URL, you’re stuck.&lt;/p&gt;
&lt;p&gt;The easiest approach is buying through Netlify. They set everything up so the domain points to your site automatically. It costs about $12/year. You can transfer the domain elsewhere later, or connect a domain you already own.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;image&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1186px) 1186px, 100vw&quot; width=&quot;1186&quot; height=&quot;333&quot; src=&quot;https://briansunter.com/_astro/image_1662087175738_0.BYufkx-t_Z1jpwWM.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1662087175738_0.BYufkx-t_Z7xYJs.webp 640w, https://briansunter.com/_astro/image_1662087175738_0.BYufkx-t_2cfGps.webp 750w, https://briansunter.com/_astro/image_1662087175738_0.BYufkx-t_1MylPY.webp 828w, https://briansunter.com/_astro/image_1662087175738_0.BYufkx-t_26Ba1T.webp 1080w, https://briansunter.com/_astro/image_1662087175738_0.BYufkx-t_Z1jpwWM.webp 1186w&quot; /&gt;&lt;figcaption&gt;image&lt;/figcaption&gt;&lt;/figure&gt;
&lt;figure&gt;&lt;img alt=&quot;image&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1186px) 1186px, 100vw&quot; width=&quot;1186&quot; height=&quot;681&quot; src=&quot;https://briansunter.com/_astro/image_1662087184888_0.DtlW9Ch0_KA8Pl.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1662087184888_0.DtlW9Ch0_24UoiR.webp 640w, https://briansunter.com/_astro/image_1662087184888_0.DtlW9Ch0_Z11Sgct.webp 750w, https://briansunter.com/_astro/image_1662087184888_0.DtlW9Ch0_2jLnVH.webp 828w, https://briansunter.com/_astro/image_1662087184888_0.DtlW9Ch0_sqlXM.webp 1080w, https://briansunter.com/_astro/image_1662087184888_0.DtlW9Ch0_KA8Pl.webp 1186w&quot; /&gt;&lt;figcaption&gt;image&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;There are many ways to host your public graph, but uploading to Netlify Drop is the easiest for non-technical users.&lt;/p&gt;
&lt;p&gt;Don’t get paralyzed by options. Get your site up now on Netlify, then figure out the perfect solution later. You can always migrate providers if you own the domain.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://twitter.com/Bsunter&quot;&gt;Let me know on Twitter if you found this guide useful&lt;/a&gt;, especially if you set up your own public graph!&lt;/p&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Werner Herzog&apos;s Rules for Filmmaking</title><link>https://briansunter.com/werner-herzog-rules-for-filmmaking</link><guid isPermaLink="true">https://briansunter.com/werner-herzog-rules-for-filmmaking</guid><description>Unconventional creative advice from one of cinema&apos;s most distinctive directors.</description><pubDate>Tue, 04 Oct 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/herzog_1672134562808_0.8nU_lE9S_Z1cmw7c.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;p&gt;Werner Herzog is a German filmmaker who has produced, written, and directed more than sixty feature and documentary films. I appreciate his unconventional creativity and the sound of his voice.&lt;/p&gt;
&lt;p&gt;He’s known for producing ambitious experimental films, like “Grizzly Man,” a documentary about a grizzly bear expert who was eaten by a grizzly bear.&lt;/p&gt;
&lt;h2&gt;Werner Herzog’s Rogue Film School&lt;/h2&gt;
&lt;p&gt;Herzog teaches his unconventional approach to filmmaking in a workshop called &lt;a href=&quot;http://www.roguefilmschool.com/default.asp&quot;&gt;Rogue Film School&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Here’s the intro, which captures his philosophy:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;“The Rogue Film School is not for the faint-hearted. It is for those who have travelled on foot, who have worked as bouncers in sex clubs or as wardens in a lunatic asylum, for those who are willing to learn about lock picking or forging shooting permits in countries not favoring their projects. In short: for those who have a sense of poetry. For those who are pilgrims. For those who can tell a story to four year old children and hold their attention. For those who have a fire burning within. For those who have a dream.”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a href=&quot;https://www.indiewire.com/2014/09/12-things-i-learned-at-werner-herzogs-rogue-film-school-69693/&quot;&gt;Here’s an account&lt;/a&gt; from someone who went through the program:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Depending on the materials, the attention will revolve around essential questions: how does music function in film? How do you narrate a story? (This will certainly depart from the brainless teachings of three-act-screenplays). How do you sensitize an audience? How is space created and understood by an audience? How do you produce and edit a film? How do you create illumination and an ecstasy of truth?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Related, but more practical subjects, will be the art of lockpicking. Traveling on foot. The exhilaration of being shot at unsuccessfully. The athletic side of filmmaking. The creation of your own shooting permits. The neutralization of bureaucracy. Guerrilla tactics. Self reliance.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;From the &lt;a href=&quot;http://www.roguefilmschool.com/about.asp&quot;&gt;about page&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;Rogue Film School required reading&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Virgil’s “Georgics”&lt;/li&gt;
&lt;li&gt;Ernest Hemingway’s “The Short Happy Life of Francis Macomber”&lt;/li&gt;
&lt;li&gt;J.A. Baker’s “The Peregrine”&lt;/li&gt;
&lt;li&gt;The Warren Commission Report&lt;/li&gt;
&lt;li&gt;“The Poetic Edda”&lt;/li&gt;
&lt;li&gt;“True History of the Conquest of New Spain” by Bernal Diaz del Castillo&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Herzog’s advice for filmmaking&lt;/h2&gt;
&lt;p&gt;From the book &lt;a href=&quot;https://www.amazon.com/dp/B00KEW6ACQ&quot;&gt;Werner Herzog: A Guide for the Perplexed&lt;/a&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Always take the initiative.&lt;/li&gt;
&lt;li&gt;There is nothing wrong with spending a night in jail if it means getting the shot you need.&lt;/li&gt;
&lt;li&gt;Send out all your dogs and one might return with prey.&lt;/li&gt;
&lt;li&gt;Never wallow in your troubles; despair must be kept private and brief.&lt;/li&gt;
&lt;li&gt;Learn to live with your mistakes.&lt;/li&gt;
&lt;li&gt;Expand your knowledge and understanding of music and literature, old and modern.&lt;/li&gt;
&lt;li&gt;That roll of unexposed celluloid you have in your hand might be the last in existence, so do something impressive with it.&lt;/li&gt;
&lt;li&gt;There is never an excuse not to finish a film.&lt;/li&gt;
&lt;li&gt;Carry bolt cutters everywhere.&lt;/li&gt;
&lt;li&gt;Thwart institutional cowardice.&lt;/li&gt;
&lt;li&gt;Ask for forgiveness, not permission.&lt;/li&gt;
&lt;li&gt;Take your fate into your own hands.&lt;/li&gt;
&lt;li&gt;Learn to read the inner essence of a landscape.&lt;/li&gt;
&lt;li&gt;Ignite the fire within and explore unknown territory.&lt;/li&gt;
&lt;li&gt;Walk straight ahead, never detour.&lt;/li&gt;
&lt;li&gt;Manoeuvre and mislead, but always deliver.&lt;/li&gt;
&lt;li&gt;Don’t be fearful of rejection.&lt;/li&gt;
&lt;li&gt;Develop your own voice.&lt;/li&gt;
&lt;li&gt;Day one is the point of no return.&lt;/li&gt;
&lt;li&gt;A badge of honor is to fail a film theory class.&lt;/li&gt;
&lt;li&gt;Chance is the lifeblood of cinema.&lt;/li&gt;
&lt;li&gt;Guerrilla tactics are best.&lt;/li&gt;
&lt;li&gt;Take revenge if need be.&lt;/li&gt;
&lt;li&gt;Get used to the bear behind you.&lt;/li&gt;
&lt;/ul&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Integer Sum Formula (Gauss Sum)</title><link>https://briansunter.com/integer-sum-formula</link><guid isPermaLink="true">https://briansunter.com/integer-sum-formula</guid><description>The classic Gauss formula for summing consecutive integers, and why it matters for algorithm analysis.</description><pubDate>Sun, 02 Oct 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;How do we find the sum of the numbers 1 through 100?&lt;/p&gt;
&lt;p&gt;For example, &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7278em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7278em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7278em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6667em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;...&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;100&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;In code this would look like:&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;js&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;let&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; sum &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 0&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;let&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; i &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 1&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;; i &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;&amp;lt;=&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 100&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;; i&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;++&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  sum &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;+=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; i;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;If you sum up these numbers, the result is &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;5050&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;h2&gt;Sum of n integers equation&lt;/h2&gt;
&lt;p&gt;Instead of adding up the numbers 1 through &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; by hand or in a loop, we can use an equation to find the answer instantly.&lt;/p&gt;
&lt;p&gt;This is the equation for the sum of integers 1 through &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;:&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.104em;vertical-align:-0.2997em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;&lt;span class=&quot;mop op-symbol small-op&quot; style=&quot;position:relative;top:0em&quot;&gt;∑&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8043em&quot;&gt;&lt;span style=&quot;top:-2.4003em;margin-left:0em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;mrel mtight&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.2029em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.2997em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.355em;vertical-align:-0.345em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mopen nulldelimiter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.01em&quot;&gt;&lt;span style=&quot;top:-2.655em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.23em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line&quot; style=&quot;border-bottom-width:0.04em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.485em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mopen mtight&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mbin mtight&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose mtight&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.345em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;We can use this equation to find the sum of numbers 1 through 100:&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7278em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7278em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7278em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6667em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;...&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;100&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.355em;vertical-align:-0.345em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mopen nulldelimiter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.01em&quot;&gt;&lt;span style=&quot;top:-2.655em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.23em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line&quot; style=&quot;border-bottom-width:0.04em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.485em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;100&lt;/span&gt;&lt;span class=&quot;mopen mtight&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;100&lt;/span&gt;&lt;span class=&quot;mbin mtight&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose mtight&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.345em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Doing the calculation:&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.355em;vertical-align:-0.345em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mopen nulldelimiter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.01em&quot;&gt;&lt;span style=&quot;top:-2.655em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.23em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line&quot; style=&quot;border-bottom-width:0.04em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.485em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;100&lt;/span&gt;&lt;span class=&quot;mopen mtight&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;100&lt;/span&gt;&lt;span class=&quot;mbin mtight&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose mtight&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.345em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.1901em;vertical-align:-0.345em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mopen nulldelimiter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8451em&quot;&gt;&lt;span style=&quot;top:-2.655em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.23em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line&quot; style=&quot;border-bottom-width:0.04em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.394em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;10100&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.345em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;5050&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;Proof&lt;/h2&gt;
&lt;h3&gt;Visual proof&lt;/h3&gt;
&lt;p&gt;One way to understand this is to imagine stacking boxes like stairs. You have one box, then two boxes stacked, then three, and so on.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Staircase of boxes from 1 to n, forming a triangular shape&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 730px) 730px, 100vw&quot; width=&quot;730&quot; height=&quot;600&quot; src=&quot;https://briansunter.com/_astro/2022-10-09-08-39-52.CAlhFoNV_27Hi9k.svg&quot; srcset=&quot;https://briansunter.com/_astro/2022-10-09-08-39-52.CAlhFoNV_Z1rsqxT.svg 640w, https://briansunter.com/_astro/2022-10-09-08-39-52.CAlhFoNV_27Hi9k.svg 730w&quot; /&gt;&lt;figcaption&gt;Staircase of boxes from 1 to n, forming a triangular shape&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The bottom and side are both length &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;. We need to find the “area” to get the total sum.&lt;/p&gt;
&lt;p&gt;We can create a rectangle by duplicating this stack and flipping it upside down:&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Two staircases combined into a rectangle of size n by (n+1)&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1170px) 1170px, 100vw&quot; width=&quot;1170&quot; height=&quot;763&quot; src=&quot;https://briansunter.com/_astro/2022-10-09-09-07-45.BhiF4YRj_2mdj9s.svg&quot; srcset=&quot;https://briansunter.com/_astro/2022-10-09-09-07-45.BhiF4YRj_Z1WaIM5.svg 640w, https://briansunter.com/_astro/2022-10-09-09-07-45.BhiF4YRj_O7aMI.svg 750w, https://briansunter.com/_astro/2022-10-09-09-07-45.BhiF4YRj_ZRWoSE.svg 828w, https://briansunter.com/_astro/2022-10-09-09-07-45.BhiF4YRj_262HDG.svg 1080w, https://briansunter.com/_astro/2022-10-09-09-07-45.BhiF4YRj_2mdj9s.svg 1170w&quot; /&gt;&lt;figcaption&gt;Two staircases combined into a rectangle of size n by (n+1)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;figure&gt;&lt;img alt=&quot;The combined rectangle showing dimensions n and n+1&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 585px) 585px, 100vw&quot; width=&quot;585&quot; height=&quot;381&quot; src=&quot;https://briansunter.com/_astro/image_1665465573710_0.CVMxB6Iu_rvJWF.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1665465573710_0.CVMxB6Iu_rvJWF.webp 585w&quot; /&gt;&lt;figcaption&gt;The combined rectangle showing dimensions n and n+1&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Notice that by flipping it, one side is &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; and the other is &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6667em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;The area of a rectangle is length times width, which gives us &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;We divide by two because we only want the original staircase (half the rectangle).&lt;/p&gt;
&lt;p&gt;This gives us the final equation: &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.355em;vertical-align:-0.345em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mopen nulldelimiter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.01em&quot;&gt;&lt;span style=&quot;top:-2.655em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.23em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line&quot; style=&quot;border-bottom-width:0.04em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.485em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mopen mtight&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mbin mtight&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose mtight&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.345em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;Proof by induction&lt;/h3&gt;
&lt;h4&gt;Base case&lt;/h4&gt;
&lt;p&gt;The base case is the sum of just the first number, so let &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;:&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.2537em;vertical-align:-0.2997em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;&lt;span class=&quot;mop op-symbol small-op&quot; style=&quot;position:relative;top:0em&quot;&gt;∑&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.954em&quot;&gt;&lt;span style=&quot;top:-2.4003em;margin-left:0em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;mrel mtight&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.2029em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.2997em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.355em;vertical-align:-0.345em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mopen nulldelimiter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.01em&quot;&gt;&lt;span style=&quot;top:-2.655em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.23em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line&quot; style=&quot;border-bottom-width:0.04em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.485em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mopen mtight&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mbin mtight&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose mtight&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.345em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.1901em;vertical-align:-0.345em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mopen nulldelimiter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8451em&quot;&gt;&lt;span style=&quot;top:-2.655em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.23em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line&quot; style=&quot;border-bottom-width:0.04em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.394em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.345em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;This checks out.&lt;/p&gt;
&lt;h4&gt;Inductive step&lt;/h4&gt;
&lt;p&gt;Now let’s find the next sum in terms of &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6667em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;:&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.2537em;vertical-align:-0.2997em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;&lt;span class=&quot;mop op-symbol small-op&quot; style=&quot;position:relative;top:0em&quot;&gt;∑&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.954em&quot;&gt;&lt;span style=&quot;top:-2.4003em;margin-left:0em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;mrel mtight&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.2029em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mbin mtight&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.2997em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;i&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;To find the next sum, we take the sum so far and add the next number to it:&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.104em;vertical-align:-0.2997em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;&lt;span class=&quot;mop op-symbol small-op&quot; style=&quot;position:relative;top:0em&quot;&gt;∑&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8043em&quot;&gt;&lt;span style=&quot;top:-2.4003em;margin-left:0em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;mrel mtight&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.2029em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.2997em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;We replace the summation with the original equation and simplify:&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.355em;vertical-align:-0.345em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mopen nulldelimiter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.01em&quot;&gt;&lt;span style=&quot;top:-2.655em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.23em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line&quot; style=&quot;border-bottom-width:0.04em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.485em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mopen mtight&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mbin mtight&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose mtight&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.345em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;To add these terms, we need a common denominator. We replace &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; with the equivalent &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.355em;vertical-align:-0.345em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mopen nulldelimiter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.01em&quot;&gt;&lt;span style=&quot;top:-2.655em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.23em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line&quot; style=&quot;border-bottom-width:0.04em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.485em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mopen mtight&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mbin mtight&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose mtight&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.345em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;:&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.355em;vertical-align:-0.345em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mopen nulldelimiter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.01em&quot;&gt;&lt;span style=&quot;top:-2.655em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.23em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line&quot; style=&quot;border-bottom-width:0.04em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.485em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mopen mtight&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mbin mtight&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose mtight&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.345em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.355em;vertical-align:-0.345em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mopen nulldelimiter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.01em&quot;&gt;&lt;span style=&quot;top:-2.655em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.23em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line&quot; style=&quot;border-bottom-width:0.04em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.485em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mopen mtight&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mbin mtight&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose mtight&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.345em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Factor out &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; from both terms:&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.355em;vertical-align:-0.345em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mopen nulldelimiter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.01em&quot;&gt;&lt;span style=&quot;top:-2.655em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.23em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line&quot; style=&quot;border-bottom-width:0.04em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.485em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mopen mtight&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mbin mtight&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose mtight&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mopen mtight&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mbin mtight&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mclose mtight&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.345em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;We can rewrite this to match the original equation’s form:&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.2537em;vertical-align:-0.2997em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;&lt;span class=&quot;mop op-symbol small-op&quot; style=&quot;position:relative;top:0em&quot;&gt;∑&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.954em&quot;&gt;&lt;span style=&quot;top:-2.4003em;margin-left:0em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;mrel mtight&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.2029em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mbin mtight&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.2997em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.355em;vertical-align:-0.345em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mopen nulldelimiter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.01em&quot;&gt;&lt;span style=&quot;top:-2.655em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.23em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line&quot; style=&quot;border-bottom-width:0.04em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.485em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mopen mtight&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mbin mtight&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose mtight&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mopen mtight&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mbin mtight&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose mtight&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mbin mtight&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose mtight&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.345em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;This looks like the original equation with &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; substituted for &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Original: &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.355em;vertical-align:-0.345em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mopen nulldelimiter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.01em&quot;&gt;&lt;span style=&quot;top:-2.655em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.23em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line&quot; style=&quot;border-bottom-width:0.04em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.485em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mopen mtight&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mbin mtight&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose mtight&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.345em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;With &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6667em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;: &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.355em;vertical-align:-0.345em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mopen nulldelimiter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.01em&quot;&gt;&lt;span style=&quot;top:-2.655em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.23em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line&quot; style=&quot;border-bottom-width:0.04em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.485em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mopen mtight&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mbin mtight&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose mtight&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mopen mtight&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mbin mtight&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose mtight&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mbin mtight&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose mtight&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.345em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This completes the induction. We’ve shown the base case holds, and that if the formula works for &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, it also works for &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6667em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;. Therefore the formula works for all positive integers.&lt;/p&gt;
&lt;h2&gt;Resources&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://brilliant.org/wiki/sum-of-n-n2-or-n3&quot;&gt;Sum of n, n², or n³ | Brilliant Math &amp;amp; Science Wiki&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Cooklang for Recipe Management</title><link>https://briansunter.com/cooklang</link><guid isPermaLink="true">https://briansunter.com/cooklang</guid><description>A plain-text recipe format that generates shopping lists and keeps your recipes in git.</description><pubDate>Wed, 21 Sep 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Cooklang is like markdown for recipes. It lets you write recipes in a human-readable format that a computer can parse to get the ingredient list, steps, etc.&lt;/p&gt;
&lt;p&gt;Recipe sites have gotten so bloated that you need to read someone’s entire life story to get the ingredients and steps. I’m a big fan of storing information in plain text in git, as well as &lt;a href=&quot;https://briansunter.com/notes/cooking/&quot;&gt;cooking&lt;/a&gt;, so I was happy to discover &lt;a href=&quot;https://cooklang.org/&quot;&gt;CookLang&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I don’t want to write my recipes in completely unstructured text because I can’t do useful things like generate shopping lists, convert units, get required cookware, etc. I also don’t want to write them in a highly structured format like JSON because it would be too difficult to read and maintain.&lt;/p&gt;
&lt;p&gt;I like cooklang because you can read it like a recipe. I also like that you can list the ingredients throughout the steps, and it automatically builds an ingredients list. You don’t have to maintain a dedicated ingredients list, and it’s easier to update.&lt;/p&gt;
&lt;h3&gt;Cooklang Recipe&lt;/h3&gt;
&lt;p&gt;Below is an example of a Cooklang recipe:&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;md&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;&amp;gt; &amp;gt; title: Sous Vide Steak&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;&amp;gt; &amp;gt; description: A simple, consistent way to cook great steak&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;&amp;gt; &amp;gt; source: https://www.seriouseats.com/food-lab-complete-guide-to-sous-vide-steak&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;&amp;gt; &amp;gt; Preheat a sous vide cooker to the desired final temperature.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;Season @steaks{450%g} generously with @salt and @pepper&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;Place in @sous vide bags{} along with @thyme{4%sprigs}, @rosemary{4%sprigs}, @garlic{4%cloves}, and @shallots{2%thinly sliced} and distribute evenly.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;Seal bags and place in a water bath for desired time according to charts.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;Turn on your vents and open your windows. Add one tablespoon of ghee, vegetable,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;canola, or rice bran oil to a heavy #cast iron{} or stainless steel skillet&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;and preheat the skillet until it reaches 450 degrees.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;Gently lay steak in the skillet, using your fingers or a set of tongs.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;Add @butter{30%g} (2 tablespoons).&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;After 15 to ~{30%seconds}, flip steak so that the second side comes into contact with the pan.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;Repeat, flipping steak every ~{30%seconds} until it has developed a nice brown sear, about ~{1.5%minutes} total.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;Serve steak immediately&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3&gt;Cooklang syntax&lt;/h3&gt;
&lt;p&gt;Although the text is human readable, this is what the special syntax means.&lt;/p&gt;
&lt;h4&gt;Ingredients&lt;/h4&gt;
&lt;p&gt;&lt;code&gt;@ingredient{quantity%unit}&lt;/code&gt;  for example  &lt;code&gt;@butter{30%g}&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;You can specify simple ingredients using  &lt;code&gt;@&lt;/code&gt; , for example,  &lt;code&gt;@salt&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Ingredients with spaces can use curly braces  &lt;code&gt;@ground pepper{}&lt;/code&gt;&lt;/p&gt;
&lt;h4&gt;Time&lt;/h4&gt;
&lt;p&gt;You can specify time using  &lt;code&gt;~{quantity%units}&lt;/code&gt;  like  &lt;code&gt;~{30%seconds}&lt;/code&gt;&lt;/p&gt;
&lt;h4&gt;Metadata&lt;/h4&gt;
&lt;p&gt;You can add metadata using the  &lt;code&gt;&amp;gt;&amp;gt;key: value&lt;/code&gt;  syntax.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;gt;&amp;gt;source: https://www.seriouseats.com/food-lab-complete-guide-to-sous-vide-steak&lt;/code&gt;&lt;/p&gt;
&lt;h4&gt;Cookware&lt;/h4&gt;
&lt;p&gt;You can specify cookware needed with  &lt;code&gt;#cookware{}&lt;/code&gt;  like  &lt;code&gt;#potato masher{}&lt;/code&gt;.&lt;/p&gt;
&lt;h4&gt;Conclusion&lt;/h4&gt;
&lt;p&gt;Overall I’m delighted with cooklang. It was pretty easy to integrate with my static site and the &lt;a href=&quot;https://obsidian.md/&quot;&gt;Obsidian&lt;/a&gt; cooklang plugin works well. I hope to collect my favorite recipes and continue to tune them over time.&lt;/p&gt;
&lt;p&gt;See &lt;a href=&quot;https://briansunter.com/recipes/&quot;&gt;here for my complete list of recipes&lt;/a&gt; categorized by tag.&lt;/p&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Newsletter Issue 8</title><link>https://briansunter.com/newsletter/issue-8</link><guid isPermaLink="true">https://briansunter.com/newsletter/issue-8</guid><description>Integer Sum Formula, Donald Knuth on Email, and Werner Herzog</description><pubDate>Tue, 23 Aug 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/image_1665465573710_0.CVMxB6Iu_Z2rSdNH.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Summary and Reflection 🤔&lt;/h2&gt;
&lt;p&gt;I’m continuing to work on the &lt;a href=&quot;https://briansunter.com/algorithms-boot-camp&quot;&gt;algorithms-boot-camp&lt;/a&gt; section of this site.&lt;/p&gt;
&lt;p&gt;I’m working through a few courses now including &lt;a href=&quot;https://stanford-cs161.github.io/winter2021/lectures/&quot;&gt;Stanford’s algorithms course&lt;/a&gt;. See my notes on &lt;a href=&quot;https://briansunter.com/time-complexity&quot;&gt;time-complexity&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I’m going over some math in Volume 1 of The Art of Computer Programming by Donald Knuth. I included a funny anecdote about his approach to email, and how he stays focused on writing his book.&lt;/p&gt;
&lt;p&gt;I also am interested in Werner Herzog’s new movie about consciousness and brain-computer interfaces called “Theatre of Thought’. Herzog is a fascinating person, and I wrote some notes on his unconventional approach to filmmaking &lt;a&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Updates 🆕&lt;/h2&gt;
&lt;h4&gt;&lt;a href=&quot;https://briansunter.com/integer-sum-formula&quot;&gt;integer-sum-formula&lt;/a&gt;&lt;/h4&gt;
&lt;figure&gt;&lt;img alt=&quot;image&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 585px) 585px, 100vw&quot; width=&quot;585&quot; height=&quot;381&quot; src=&quot;https://briansunter.com/_astro/image_1665465573710_0.CVMxB6Iu_rvJWF.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1665465573710_0.CVMxB6Iu_rvJWF.webp 585w&quot; /&gt;&lt;figcaption&gt;image&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;How do you find the sum of the numbers 1 through 100?&lt;/p&gt;
&lt;p&gt;There’s a &lt;a href=&quot;https://web.archive.org/web/20250924104428/https://www.americanscientist.org/article/gausss-day-of-reckoning&quot;&gt;legend about the mathematician Carl Gauss&lt;/a&gt; coming up with the &lt;a href=&quot;https://briansunter.com/integer-sum-formula&quot;&gt;integer-sum-formula&lt;/a&gt; as a child in school. Supposedly the teacher asked the class to do a tedious assignment of adding numbers 1 through 100. Gauss could come up with the answer instantly, whereas the other students took 30 minutes to find the answer.&lt;/p&gt;
&lt;p&gt;You can use the formula sum = n(n+1)/2 to find the sum of 1 to n numbers.&lt;/p&gt;
&lt;p&gt;This is a good problem for studying math proofs because this equation has many different proofs and variations. I linked a video in the note that includes 12+ proofs.&lt;/p&gt;
&lt;p&gt;For more, see my note on &lt;a href=&quot;https://briansunter.com/integer-sum-formula&quot;&gt;integer-sum-formula&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Productivity Toolkit 🛠️&lt;/h2&gt;
&lt;p&gt;In this section, I’ll share a productivity tip I’ve learned recently.&lt;/p&gt;
&lt;p&gt;We live in an age where we are constantly bombarded by messages and interruptions.&lt;/p&gt;
&lt;p&gt;We are more connected and have more information than ever, but it’s almost impossible to do deep, focused work.&lt;/p&gt;
&lt;p&gt;Interestingly, some of the most outstanding computer scientists, like Donald Knuth and Edsger W. Dijkstra, were cautious about certain technology trends like email.&lt;/p&gt;
&lt;h3&gt;On Email&lt;/h3&gt;
&lt;figure&gt;&lt;img alt=&quot;image&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 347px) 347px, 100vw&quot; width=&quot;347&quot; height=&quot;309&quot; src=&quot;https://briansunter.com/_astro/image_1665467044511_0.kHp6ljUE_Z9xkDm.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1665467044511_0.kHp6ljUE_Z9xkDm.webp 347w&quot; /&gt;&lt;figcaption&gt;image&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Donald Knuth is a computer scientist who has been writing a book series called “The Art of Computer Programming” for over 50 years. The book is a comprehensive treatise on the subject of computer programming.&lt;/p&gt;
&lt;p&gt;He has famously stayed focused on writing the book and carefully communicating with his fans.&lt;/p&gt;
&lt;p&gt;Donald Knuth doesn’t have a personal email address. To reach him directly for questions or comments, you have to &lt;a href=&quot;https://www-cs-faculty.stanford.edu/~knuth/email.html&quot;&gt;mail him a letter.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Here’s what he thinks about email:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I have been a happy man ever since January 1, 1990, when I no longer had an email address.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Email is a wonderful thing for people whose role in life is to be on top of things. But not for me; my role is to be on the bottom of things. What I do takes long hours of studying and uninterruptible concentration.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;I need to communicate with thousands of people all over the world as I write my books. I also want to be responsive to the people who read those books and have questions or comments. My goal is to do this communication efficiently, in batch mode --- like, one day every six months&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;I DO NOT ANSWER UNSOLICITED EMAILS, nor do I respond to emails that were sent to my colleagues with a bothersome request for them to communicate with me. Email is a no-no EXCEPT for reporting errors in books.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;I hope you can understand why I am almost always unhappy to receive unsolicited email myself. Thank you for your patience and cooperation as I try to finish The Art of Computer Programming (&lt;a href=&quot;https://www-cs-faculty.stanford.edu/~knuth/taocp.html&quot;&gt;TAOCP&lt;/a&gt;), a work that I began in 1962 and that I will need many years to complete.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a href=&quot;https://www-cs-faculty.stanford.edu/~knuth/email.html&quot;&gt;See Knuth’s post on email, for more.&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Knuth Reward Checks&lt;/h3&gt;
&lt;figure&gt;&lt;img alt=&quot;image&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 900px) 900px, 100vw&quot; width=&quot;900&quot; height=&quot;408&quot; src=&quot;https://briansunter.com/_astro/image_1665466908028_0.-9C4aPGz_L5PUV.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1665466908028_0.-9C4aPGz_VnDaz.webp 640w, https://briansunter.com/_astro/image_1665466908028_0.-9C4aPGz_2vfLn4.webp 750w, https://briansunter.com/_astro/image_1665466908028_0.-9C4aPGz_1ecMNM.webp 828w, https://briansunter.com/_astro/image_1665466908028_0.-9C4aPGz_L5PUV.webp 900w&quot; /&gt;&lt;figcaption&gt;image&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;There is an email address for reporting errors in his books, but his secretary filters and prints the messages for him. The email address is strictly for reporting his book’s technical, typographical, or historical errors.&lt;/p&gt;
&lt;p&gt;If you are the first to find an error, Donald Knuth will personally write you a check for $2.56 (a hexadecimal “dollar”). These checks are considered one of the most prized trophies in computer science.&lt;/p&gt;
&lt;p&gt;For more info on &lt;a href=&quot;https://en.wikipedia.org/wiki/Knuth_reward_check&quot;&gt;Knuth Checks, see here.&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Brain Food 🧠 Theater of Thought&lt;/h2&gt;
&lt;p&gt;In this section, I’ll share some interesting articles and “food for thought”&lt;/p&gt;
&lt;p&gt;Werner Herzog is a german filmmaker who has produced, written, and directed more than sixty feature and documentary films. I appreciate his unconventional creativity and the sound of his voice.&lt;/p&gt;
&lt;h4&gt;&lt;a href=&quot;https://briansunter.com/werner-herzog-rules-for-filmmaking&quot;&gt;werner-herzog-rules-for-filmmaking&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;He just released a new movie about consciousness and brain-computer interfaces called “Theatre of Thought.”&lt;/p&gt;
&lt;p&gt;He interviews people working on technology that lets your brain communicate directly with computers. The Matrix is one of my favorite movies of all time, and I’m interested in this area of research. I’m excited to check out this film when it’s released. I still need help finding a place to watch it online.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Werner Herzog sets his sights on yet another mysterious landscape (the human brain) for clues as to why a hunk of tissue can produce profound thoughts and feelings while considering the philosophical, ethical, and social implications of fast-advancing neural technology.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/9P0nHSKwWMU&quot; title=&quot;YouTube video player&quot; frameborder=&quot;0&quot; allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen&gt;&lt;/iframe&gt;
&lt;p&gt;I’ve taken some werner-herzog-rules-for-filmmaking|notes on Herzog&apos;s creative approach to filmmaking here.&lt;/p&gt;
&lt;h2&gt;Outro&lt;/h2&gt;
&lt;p&gt;Check out the &lt;a href=&quot;https://briansunter.com/newsletter-roadmap&quot;&gt;newsletter-roadmap&lt;/a&gt; to see what I have in mind for future issues. Get in touch with me on &lt;a href=&quot;https://twitter.com&quot;&gt;twitter @bsunter&lt;/a&gt; if you have any questions or comments!&lt;/p&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>A Posteriori vs A Priori Analysis of Algorithms</title><link>https://briansunter.com/posteriori-vs-a-priori-analysis-of-algorithms</link><guid isPermaLink="true">https://briansunter.com/posteriori-vs-a-priori-analysis-of-algorithms</guid><description>Two ways to measure algorithm performance: running benchmarks vs. mathematical analysis.</description><pubDate>Mon, 22 Aug 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;There are two fundamental approaches to measuring how fast an algorithm runs: actually running it, or analyzing it mathematically.&lt;/p&gt;
&lt;h2&gt;A Posteriori analysis (profiling)&lt;/h2&gt;
&lt;p&gt;The most straightforward way to measure algorithm speed is to run it and time it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;A posteriori&lt;/strong&gt; is Latin for “from the later.” You run the algorithm first, then measure after.&lt;/p&gt;
&lt;p&gt;Examples include benchmarking and profiling, where you run your program and record how long it takes in seconds. There are many tools for this kind of performance measurement.&lt;/p&gt;
&lt;p&gt;You can also analyze memory usage and other resource consumption.&lt;/p&gt;
&lt;p&gt;This approach is hardware dependent since you’re running a real program. Results also depend on the programming language. A program written in C will generally run faster than the same algorithm in JavaScript.&lt;/p&gt;
&lt;h2&gt;A Priori analysis (time complexity)&lt;/h2&gt;
&lt;p&gt;Sometimes we want a theoretical measure of how long an algorithm takes without actually running it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;A priori&lt;/strong&gt; is Latin for “from the earlier.” You analyze the algorithm before running it.&lt;/p&gt;
&lt;p&gt;Some algorithms can be proven to always be faster than others, regardless of hardware. Since computers keep getting faster, it’s useful to know which algorithms will always be faster without retesting them on every new machine.&lt;/p&gt;
&lt;p&gt;Time complexity analysis is the main example of a priori analysis. Bubble sort has a time complexity of &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0641em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;. This is the same no matter what programming language or hardware you use.&lt;/p&gt;
&lt;h2&gt;Comparison&lt;/h2&gt;





























&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;A Posteriori&lt;/th&gt;&lt;th&gt;A Priori&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Hardware and language dependent&lt;/td&gt;&lt;td&gt;Independent of language and hardware&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Gives exact measurements&lt;/td&gt;&lt;td&gt;Gives approximate bounds&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Uses seconds and bytes&lt;/td&gt;&lt;td&gt;Uses asymptotic notation (Big O)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Results differ between systems&lt;/td&gt;&lt;td&gt;Same for every system&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Improve by upgrading hardware/compiler&lt;/td&gt;&lt;td&gt;Improve by changing the algorithm&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Time Complexity Analysis</title><link>https://briansunter.com/time-complexity</link><guid isPermaLink="true">https://briansunter.com/time-complexity</guid><description>What Big O notation actually means, how to compare algorithm efficiency, and the difference between O, Theta, and Omega.</description><pubDate>Mon, 22 Aug 2022 00:00:00 GMT</pubDate><content:encoded>&lt;h2&gt;Introduction to algorithms&lt;/h2&gt;
&lt;h3&gt;Algorithms vs programs&lt;/h3&gt;

























&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Algorithm&lt;/th&gt;&lt;th&gt;Program&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Focused on design&lt;/td&gt;&lt;td&gt;Implementation in a programming language on hardware&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Domain knowledge&lt;/td&gt;&lt;td&gt;Software engineering&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Language independent&lt;/td&gt;&lt;td&gt;Specific language&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Analyzed theoretically&lt;/td&gt;&lt;td&gt;Tested empirically&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;h2&gt;Priori vs posteriori analysis&lt;/h2&gt;
&lt;p&gt;See my detailed notes on posteriori-vs-a-priori-analysis-of-algorithms|a posteriori vs a priori analysis.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;A priori analysis&lt;/strong&gt; is theoretical, hardware independent, and language independent. We analyze time and space as mathematical functions.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;A posteriori analysis&lt;/strong&gt; measures actual execution time and memory usage on real hardware.&lt;/p&gt;
&lt;h2&gt;Algorithm characteristics&lt;/h2&gt;
&lt;h3&gt;Input&lt;/h3&gt;
&lt;p&gt;Algorithms can take zero or more inputs.&lt;/p&gt;
&lt;h3&gt;Output&lt;/h3&gt;
&lt;p&gt;Algorithms must generate some result. If an algorithm doesn’t produce output, it’s not useful. Even a void function should have some observable effect, like modifying a variable.&lt;/p&gt;
&lt;h3&gt;Definiteness&lt;/h3&gt;
&lt;p&gt;Everything should be unambiguous and clear. If you can’t describe the problem to a human, you don’t understand it well enough to write an algorithm.&lt;/p&gt;
&lt;p&gt;For example, you can’t pass an imaginary number like &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.04em;vertical-align:-0.1744em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord sqrt&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8656em&quot;&gt;&lt;span class=&quot;svg-align&quot; style=&quot;top:-3em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot; style=&quot;padding-left:0.833em&quot;&gt;&lt;span class=&quot;mord&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-2.8256em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;hide-tail&quot; style=&quot;min-width:0.853em;height:1.08em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.1744em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; without specifying how to handle it.&lt;/p&gt;
&lt;h3&gt;Finiteness&lt;/h3&gt;
&lt;p&gt;Algorithms must terminate at some point. A web server that runs indefinitely is a program, not an algorithm. Programs may use algorithms internally.&lt;/p&gt;
&lt;h3&gt;Effectiveness&lt;/h3&gt;
&lt;p&gt;Don’t include unnecessary steps. In chemistry, you wouldn’t boil a chemical and then not use it in the experiment.&lt;/p&gt;
&lt;h2&gt;How to write and analyze algorithms&lt;/h2&gt;
&lt;h3&gt;Swapping two numbers&lt;/h3&gt;
&lt;p&gt;Here’s pseudocode for swapping two values:&lt;/p&gt;
&lt;div class=&quot;markdown-alert markdown-alert-note&quot;&gt;&lt;p&gt;Note&lt;/p&gt;&lt;p&gt;This particular function only works for languages that support “pass by reference” like C/C++. Read more &lt;a href=&quot;https://www.javadude.com/articles/passbyvalue.htm&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;js&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; swap&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;b&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  tmp &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; a;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  a &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; b;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  b &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; tmp;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3&gt;Criteria for analyzing algorithms&lt;/h3&gt;
&lt;p&gt;Time and space are the most important criteria.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Time&lt;/strong&gt;: How long will the algorithm take to run?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Space&lt;/strong&gt;: How much memory does the algorithm need?&lt;/p&gt;
&lt;p&gt;Other characteristics may matter in specific contexts:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Network traffic&lt;/strong&gt;: How much data is sent over the network?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Power&lt;/strong&gt;: How much energy does the algorithm consume? (Important for mobile devices)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;CPU registers&lt;/strong&gt;: For low-level software, you may need to know hardware details.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Time analysis&lt;/h3&gt;
&lt;p&gt;Every “simple” statement takes one “unit” of time. A procedure with 3 simple statements takes 3 units of time, written as &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1076em&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;3&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;This is a &lt;strong&gt;constant&lt;/strong&gt; value. It doesn’t matter what input you give it.&lt;/p&gt;
&lt;p&gt;For simplicity, we usually say &lt;code&gt;y = 3*a + 6*b&lt;/code&gt; is just 1 unit of time. It’s not necessary to count every operation.&lt;/p&gt;
&lt;h3&gt;Space analysis&lt;/h3&gt;
&lt;p&gt;What’s the space complexity of the swap function? It uses 3 variables always, regardless of input, so &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;s&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;3&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; which is constant.&lt;/p&gt;
&lt;p&gt;Each variable is one “unit” of space.&lt;/p&gt;
&lt;h2&gt;Frequency count method&lt;/h2&gt;
&lt;p&gt;The time taken by an algorithm can be determined by assigning one “unit” of time for each statement. If a statement repeats, the frequency of execution determines the time.&lt;/p&gt;
&lt;h3&gt;Sum of elements in array&lt;/h3&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;js&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; sumArray&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;nums&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  sum &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 0&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;  for&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (i &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 0&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;; i &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; nums.&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;length&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;; i&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;++&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    sum &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; sum &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; nums[i];&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;  return&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; sum;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Time complexity&lt;/strong&gt;: Given an array of length n, the sum operation runs n times, so the algorithm takes &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; time. We call this “order of n.”&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Space complexity&lt;/strong&gt;: We have variables &lt;code&gt;sum&lt;/code&gt;, &lt;code&gt;i&lt;/code&gt;, and &lt;code&gt;nums&lt;/code&gt;. The array &lt;code&gt;nums&lt;/code&gt; has n units of space, while &lt;code&gt;i&lt;/code&gt; and &lt;code&gt;sum&lt;/code&gt; each have 1 unit. Since &lt;code&gt;nums&lt;/code&gt; dominates, the space complexity is &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;h3&gt;Matrix addition&lt;/h3&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;js&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; addMatrix&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;b&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;  for&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (i &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 0&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;; i &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; a.&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;length&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;; i&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;++&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;    for&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (j &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 0&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;; j &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; a[&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;].&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;length&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;; j&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;++&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;      c[i][j] &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; a[i][j] &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; b[i][j];&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Time complexity&lt;/strong&gt;: Two nested for loops, each running n times. That’s n procedures executing n times, giving us &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0641em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Space complexity&lt;/strong&gt;: Three matrices (&lt;code&gt;a&lt;/code&gt;, &lt;code&gt;b&lt;/code&gt;, &lt;code&gt;c&lt;/code&gt;) and two scalar variables (&lt;code&gt;i&lt;/code&gt;, &lt;code&gt;j&lt;/code&gt;).&lt;/p&gt;
&lt;h2&gt;Time complexity patterns&lt;/h2&gt;
&lt;p&gt;How do we analyze time complexity for different code patterns?&lt;/p&gt;
&lt;h3&gt;Normal for loops&lt;/h3&gt;
&lt;p&gt;The statement executes n times, so it’s &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;:&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;js&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (i &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 0&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;; i &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; n; i&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;++&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;  stmt&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3&gt;Decrementing for loop&lt;/h3&gt;
&lt;p&gt;Even though &lt;code&gt;i&lt;/code&gt; decrements, the statement still executes n times, so it’s &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;:&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;js&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (i &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; n; i &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 0&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;; i&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;--&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;  stmt&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3&gt;Increment by two&lt;/h3&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;js&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (i &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 0&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;; i &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; n; i &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;+=&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 2&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;  stmt&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This executes n/2 times. It’s still &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; because constants are dropped.&lt;/p&gt;
&lt;h3&gt;Nested for loops&lt;/h3&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;js&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (i &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 0&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;; i &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; n; i&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;++&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;  for&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (j &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 0&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;; j &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; n; j&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;++&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;    stmt&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Each loop executes n times, so the statement runs &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6667em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;×&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; times, giving &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0641em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;h3&gt;Dependent for loops&lt;/h3&gt;
&lt;p&gt;What if the inner loop depends on the outer loop?&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;js&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (i &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 0&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;; i &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; n; i&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;++&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;  for&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (j &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 0&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;; j &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; i; j&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;++&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;    stmt&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Let’s trace the values:&lt;/p&gt;








































&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;i&lt;/th&gt;&lt;th&gt;j values&lt;/th&gt;&lt;th&gt;stmt executions&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;0&lt;/td&gt;&lt;td&gt;(none)&lt;/td&gt;&lt;td&gt;0&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;0&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;0, 1&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;3&lt;/td&gt;&lt;td&gt;0, 1, 2&lt;/td&gt;&lt;td&gt;3&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;…&lt;/td&gt;&lt;td&gt;…&lt;/td&gt;&lt;td&gt;…&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;n&lt;/td&gt;&lt;td&gt;0, 1, …, n-1&lt;/td&gt;&lt;td&gt;n&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;How many times does &lt;code&gt;stmt&lt;/code&gt; execute? This is equivalent to &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7278em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7278em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7278em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6667em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;...&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Using the integer-sum-formula|integer sum formula:&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1076em&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.355em;vertical-align:-0.345em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mopen nulldelimiter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.01em&quot;&gt;&lt;span style=&quot;top:-2.655em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.23em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line&quot; style=&quot;border-bottom-width:0.04em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.485em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mopen mtight&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mbin mtight&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose mtight&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.345em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.3629em;vertical-align:-0.345em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mopen nulldelimiter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.0179em&quot;&gt;&lt;span style=&quot;top:-2.655em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.23em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line&quot; style=&quot;border-bottom-width:0.04em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.394em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8913em&quot;&gt;&lt;span style=&quot;top:-2.931em;margin-right:0.0714em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.5em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size3 size1 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mbin mtight&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.345em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;This simplifies to &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0641em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; because we only care about the highest power.&lt;/p&gt;
&lt;h3&gt;Non-linear loop termination&lt;/h3&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;js&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;p &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 0&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (i &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 1&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;; p &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;&amp;lt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; n; i&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;++&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  p &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; p &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; i;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;  stmt&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Let’s trace the values:&lt;/p&gt;





























&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;i&lt;/th&gt;&lt;th&gt;p&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;3&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;3&lt;/td&gt;&lt;td&gt;6&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;4&lt;/td&gt;&lt;td&gt;10&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;k&lt;/td&gt;&lt;td&gt;1+2+…+k&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;Using the integer-sum-formula|integer sum formula, &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.625em;vertical-align:-0.1944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.355em;vertical-align:-0.345em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mopen nulldelimiter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.01em&quot;&gt;&lt;span style=&quot;top:-2.655em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.23em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line&quot; style=&quot;border-bottom-width:0.04em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.485em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;mopen mtight&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;mbin mtight&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose mtight&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.345em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;The loop stops when &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7335em;vertical-align:-0.1944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;:&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.355em;vertical-align:-0.345em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mopen nulldelimiter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.01em&quot;&gt;&lt;span style=&quot;top:-2.655em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.23em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line&quot; style=&quot;border-bottom-width:0.04em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.485em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;mopen mtight&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;mbin mtight&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose mtight&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.345em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;This simplifies to &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.8532em;vertical-align:-0.0391em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, so &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7335em;vertical-align:-0.0391em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.04em;vertical-align:-0.2397em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord sqrt&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8003em&quot;&gt;&lt;span class=&quot;svg-align&quot; style=&quot;top:-3em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot; style=&quot;padding-left:0.833em&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-2.7603em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;hide-tail&quot; style=&quot;min-width:0.853em;height:1.08em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.2397em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;The time complexity is &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0503em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord sqrt&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8003em&quot;&gt;&lt;span class=&quot;svg-align&quot; style=&quot;top:-3em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot; style=&quot;padding-left:0.833em&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-2.7603em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;hide-tail&quot; style=&quot;min-width:0.853em;height:1.08em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.2397em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;h3&gt;Multiply i value&lt;/h3&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;js&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (i &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 1&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;; i &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; n; i &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; i &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 2&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;  stmt&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

























&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;iteration&lt;/th&gt;&lt;th&gt;i&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;3&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;4&lt;/td&gt;&lt;td&gt;8&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;The pattern is &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6595em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.8491em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8491em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;mbin mtight&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;. The loop stops when &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7955em;vertical-align:-0.136em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;≥&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;:&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.8491em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8491em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.9386em;vertical-align:-0.2441em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.207em&quot;&gt;&lt;span style=&quot;top:-2.4559em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.2441em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The time complexity is &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;h3&gt;Divide i value&lt;/h3&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;js&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (i &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; n; i &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;&amp;gt;=&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 1&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;; i &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; i &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 2&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;  stmt&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The sequence is &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0404em;vertical-align:-0.345em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mpunct&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mopen nulldelimiter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.6954em&quot;&gt;&lt;span style=&quot;top:-2.655em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.23em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line&quot; style=&quot;border-bottom-width:0.04em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.394em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.345em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mpunct&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mopen nulldelimiter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.6954em&quot;&gt;&lt;span style=&quot;top:-2.655em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;4&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.23em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line&quot; style=&quot;border-bottom-width:0.04em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.394em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.345em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mpunct&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mopen nulldelimiter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.6954em&quot;&gt;&lt;span style=&quot;top:-2.655em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;8&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.23em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line&quot; style=&quot;border-bottom-width:0.04em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.394em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.345em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mpunct&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;...&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The loop stops when &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6986em;vertical-align:-0.0391em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;:&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0528em;vertical-align:-0.3574em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mopen nulldelimiter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.6954em&quot;&gt;&lt;span style=&quot;top:-2.6426em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.782em&quot;&gt;&lt;span style=&quot;top:-2.786em;margin-right:0.0714em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.5em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size3 size1 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.23em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line&quot; style=&quot;border-bottom-width:0.04em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.394em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.3574em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.8491em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8491em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.9386em;vertical-align:-0.2441em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.207em&quot;&gt;&lt;span style=&quot;top:-2.4559em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.2441em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The time complexity is &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;h2&gt;While loops and conditionals&lt;/h2&gt;
&lt;p&gt;We can analyze functions with while loops and if statements by tracing values:&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;js&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;while&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (m &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;!=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; n) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;  if&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (m &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; n) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    m &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; m &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; n;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  } &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;else&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    n &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; n &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; m;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;





































&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;m (starting at 16)&lt;/th&gt;&lt;th&gt;n&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;14&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;12&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;10&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;8&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;6&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;4&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;With input 16, it runs 7 times (16/2 - 1). The time complexity is &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;h2&gt;Classes of functions&lt;/h2&gt;
&lt;p&gt;These are listed in increasing order of growth:&lt;/p&gt;


















































&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Class&lt;/th&gt;&lt;th&gt;Notation&lt;/th&gt;&lt;th&gt;Example&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Constant&lt;/td&gt;&lt;td&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1076em&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;5000&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Logarithmic&lt;/td&gt;&lt;td&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td&gt;Binary search&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Square root&lt;/td&gt;&lt;td&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0503em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord sqrt&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8003em&quot;&gt;&lt;span class=&quot;svg-align&quot; style=&quot;top:-3em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot; style=&quot;padding-left:0.833em&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-2.7603em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;hide-tail&quot; style=&quot;min-width:0.853em;height:1.08em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.2397em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td&gt;Some prime checks&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Linear&lt;/td&gt;&lt;td&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td&gt;Simple loop&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Linearithmic&lt;/td&gt;&lt;td&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td&gt;Merge sort&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Quadratic&lt;/td&gt;&lt;td&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0641em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td&gt;Nested loops&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Cubic&lt;/td&gt;&lt;td&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0641em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;3&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td&gt;Triple nested loops&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Exponential&lt;/td&gt;&lt;td&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.6644em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td&gt;Recursive Fibonacci&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;h3&gt;Sample values&lt;/h3&gt;



































&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.9386em;vertical-align:-0.2441em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.207em&quot;&gt;&lt;span style=&quot;top:-2.4559em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.2441em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/th&gt;&lt;th&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/th&gt;&lt;th&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.8141em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/th&gt;&lt;th&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6644em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.6644em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;0&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;td&gt;16&lt;/td&gt;&lt;td&gt;16&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;3&lt;/td&gt;&lt;td&gt;8&lt;/td&gt;&lt;td&gt;64&lt;/td&gt;&lt;td&gt;256&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;Exponential functions grow much faster. When n gets large, &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.8141em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;100&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; will always be less than &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6644em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.6644em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Image credit: &lt;a href=&quot;https://commons.wikimedia.org/wiki/File:Comparison_computational_complexity.svg&quot;&gt;Cmglee&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;Asymptotic notation&lt;/h2&gt;
&lt;h3&gt;Big O (&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;) - Upper bound&lt;/h3&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1076em&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0359em&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;))&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; means there exist positive constants c and k such that &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7804em;vertical-align:-0.136em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;≤&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1076em&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;≤&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4445em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;c&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;⋅&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0359em&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; for all &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7719em;vertical-align:-0.136em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;≥&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;If you graph the bounding function, your function’s value is always less than the Big O upper bound.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Big O notation showing function bounded above by c*g(n)&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 453px) 453px, 100vw&quot; width=&quot;453&quot; height=&quot;261&quot; src=&quot;https://briansunter.com/_astro/image_1666066293557_0.BCo2pP_C_23XVYH.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1666066293557_0.BCo2pP_C_23XVYH.webp 453w&quot; /&gt;&lt;figcaption&gt;Big O notation showing function bounded above by c*g(n)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;em&gt;Source: &lt;a href=&quot;https://xlinux.nist.gov/dads/HTML/theta.html&quot;&gt;NIST&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;For example, if &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1076em&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7278em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;3&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, then &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6835em;vertical-align:-0.0391em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7278em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;3&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; for large n, so &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1076em&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Use the closest function for the upper bound. Even though &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.8141em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; could be an upper bound for a linear function, it’s less useful.&lt;/p&gt;
&lt;h3&gt;Big Omega (&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;Ω&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;) - Lower bound&lt;/h3&gt;
&lt;p&gt;Similar to Big O, but your function is always greater than the omega function.&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1076em&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;Ω&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0359em&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;))&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; means there exist positive constants c and k such that &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1076em&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;≥&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4445em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;c&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;⋅&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0359em&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; for all &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7719em;vertical-align:-0.136em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;≥&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Big Omega notation showing function bounded below&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 443px) 443px, 100vw&quot; width=&quot;443&quot; height=&quot;264&quot; src=&quot;https://briansunter.com/_astro/image_1666138709938_0.zWvzFCB8_Sjg5v.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1666138709938_0.zWvzFCB8_Sjg5v.webp 443w&quot; /&gt;&lt;figcaption&gt;Big Omega notation showing function bounded below&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h3&gt;Theta (&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;Θ&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;) - Tight bound&lt;/h3&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1076em&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;Θ&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0359em&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;))&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; means there exist positive constants &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.5806em;vertical-align:-0.15em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;c&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.3011em&quot;&gt;&lt;span style=&quot;top:-2.55em;margin-left:0em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.15em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.5806em;vertical-align:-0.15em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;c&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.3011em&quot;&gt;&lt;span style=&quot;top:-2.55em;margin-left:0em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.15em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, and k such that &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.5945em;vertical-align:-0.15em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;c&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.3011em&quot;&gt;&lt;span style=&quot;top:-2.55em;margin-left:0em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.15em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;⋅&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0359em&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;≤&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1076em&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;≤&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.5945em;vertical-align:-0.15em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;c&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.3011em&quot;&gt;&lt;span style=&quot;top:-2.55em;margin-left:0em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.15em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;⋅&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0359em&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; for all &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7719em;vertical-align:-0.136em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;≥&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0315em&quot;&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;For &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1076em&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7278em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;3&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;:&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;⋅&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7719em;vertical-align:-0.136em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;≤&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7278em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7804em;vertical-align:-0.136em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;≤&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;⋅&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;So &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1076em&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;Θ&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Since this is a tight bound, you can’t use &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0641em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;Θ&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; for a linear function.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Theta notation showing function bounded above and below&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 443px) 443px, 100vw&quot; width=&quot;443&quot; height=&quot;264&quot; src=&quot;https://briansunter.com/_astro/image_1666139032348_0.DQLDsFTh_1fl4Sh.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1666139032348_0.DQLDsFTh_1fl4Sh.webp 443w&quot; /&gt;&lt;figcaption&gt;Theta notation showing function bounded above and below&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2&gt;Properties of asymptotic notation&lt;/h2&gt;
&lt;h3&gt;General property&lt;/h3&gt;
&lt;p&gt;If &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1076em&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0359em&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;))&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, then &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4445em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;⋅&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1076em&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0359em&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;))&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; for any constant a.&lt;/p&gt;
&lt;p&gt;Example: &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1076em&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.8974em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;5&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; is &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0641em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, and &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0641em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.8974em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;14&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;35&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; is also &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0641em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;h3&gt;Reflexive property&lt;/h3&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1076em&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1076em&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;))&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Example: &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.8141em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0641em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;Transitive property&lt;/h3&gt;
&lt;p&gt;If &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1076em&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0359em&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;))&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; and &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0359em&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;h&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;))&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, then &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1076em&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;h&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;))&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;If g(n) is an upper bound for f(n), and h(n) is an upper bound for g(n), then h(n) is also an upper bound for f(n).&lt;/p&gt;
&lt;h3&gt;Symmetric property (Theta only)&lt;/h3&gt;
&lt;p&gt;If &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1076em&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;Θ&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0359em&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;))&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, then &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0359em&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;Θ&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1076em&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;))&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;h3&gt;Transpose symmetric property (O and Omega)&lt;/h3&gt;
&lt;p&gt;If &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1076em&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0359em&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;))&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, then &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0359em&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;Ω&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1076em&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;))&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Example: &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0641em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; and &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.8141em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;Ω&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;Combining functions&lt;/h3&gt;
&lt;p&gt;If &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1076em&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0359em&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;))&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; and &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;d&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;))&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Addition: &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1076em&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;d&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0359em&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mpunct&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)))&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Multiplication: &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.1076em&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;⋅&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;d&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0359em&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;⋅&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;))&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Comparing functions&lt;/h2&gt;
&lt;p&gt;To determine which function is the upper bound, we can sample values or apply logarithms.&lt;/p&gt;
&lt;p&gt;For &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.8141em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; vs &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.8141em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;3&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;:&lt;/p&gt;

























&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;n&lt;/th&gt;&lt;th&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.8141em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/th&gt;&lt;th&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.8141em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;3&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;td&gt;8&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;3&lt;/td&gt;&lt;td&gt;9&lt;/td&gt;&lt;td&gt;27&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;4&lt;/td&gt;&lt;td&gt;16&lt;/td&gt;&lt;td&gt;64&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;Applying log to both sides:&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0641em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; vs &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0641em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;3&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; vs &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;We can see that &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;≤&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, so &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.8141em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0641em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8141em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;3&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;h3&gt;Logarithm rules&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;⋅&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;b&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;b&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.095em;vertical-align:-0.345em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mopen nulldelimiter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.6954em&quot;&gt;&lt;span style=&quot;top:-2.655em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;b&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.23em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line&quot; style=&quot;border-bottom-width:0.04em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.394em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;a&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.345em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;b&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.0991em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8491em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;b&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;b&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;⋅&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.888em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.888em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mop mtight&quot;&gt;&lt;span class=&quot;mop mtight&quot;&gt;&lt;span class=&quot;mtight&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;mtight&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;mtight&quot; style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.0417em&quot;&gt;&lt;span style=&quot;top:-2.2341em;margin-right:0.0714em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.5em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size3 size1 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;c&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.2659em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mopen mtight&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;b&lt;/span&gt;&lt;span class=&quot;mclose mtight&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.888em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;b&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.888em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mop mtight&quot;&gt;&lt;span class=&quot;mop mtight&quot;&gt;&lt;span class=&quot;mtight&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;mtight&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;mtight&quot; style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.0417em&quot;&gt;&lt;span style=&quot;top:-2.2341em;margin-right:0.0714em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.5em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size3 size1 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;c&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.2659em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mopen mtight&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;mclose mtight&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;If &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.8491em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8491em&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;b&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, then &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;b&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.0573em&quot;&gt;&lt;span style=&quot;top:-2.4559em;margin-right:0.05em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;a&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.2441em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Best, worst, and average case&lt;/h2&gt;
&lt;h3&gt;Linear search&lt;/h3&gt;
&lt;p&gt;Given a list &lt;code&gt;[8, 6, 12, 5, 9, 7, 4, 3, 16, 18]&lt;/code&gt; and searching for &lt;code&gt;7&lt;/code&gt;:&lt;/p&gt;
&lt;p&gt;Linear search starts at the first element and checks each one, moving left to right.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Best case&lt;/strong&gt;: Element is at the first index. Time is &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Worst case&lt;/strong&gt;: Element is at the last index or not present. Time is &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Average case&lt;/strong&gt;: We sum the time for all possible positions and divide by the number of cases.&lt;/p&gt;
&lt;p&gt;If the element is at position 1, we do 1 comparison. At position 2, 2 comparisons. And so on.&lt;/p&gt;
&lt;p&gt;Total comparisons: &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7278em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7278em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7278em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6667em;vertical-align:-0.0833em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;...&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Using the integer-sum-formula|integer sum formula: &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.355em;vertical-align:-0.345em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mopen nulldelimiter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.01em&quot;&gt;&lt;span style=&quot;top:-2.655em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.23em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line&quot; style=&quot;border-bottom-width:0.04em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.485em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mopen mtight&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mbin mtight&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose mtight&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.345em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Dividing by n cases: &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.1901em;vertical-align:-0.345em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mopen nulldelimiter&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mfrac&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8451em&quot;&gt;&lt;span style=&quot;top:-2.655em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.23em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;frac-line&quot; style=&quot;border-bottom-width:0.04em&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.394em&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mathnormal mtight&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mbin mtight&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.345em&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mclose nulldelimiter&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;This is the average case time.&lt;/p&gt;
&lt;h3&gt;Note on notation&lt;/h3&gt;
&lt;p&gt;Don’t confuse best/worst/average case with Big O/Omega/Theta. Best case can be expressed using any of these notations:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Best case = 1&lt;/li&gt;
&lt;li&gt;Best case = &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Best case = &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;Ω&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Best case = &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;Θ&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Binary search&lt;/h3&gt;
&lt;figure&gt;&lt;img alt=&quot;Binary search tree with root 20&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 936px) 936px, 100vw&quot; width=&quot;936&quot; height=&quot;602&quot; src=&quot;https://briansunter.com/_astro/Screenshot_2022-11-28_at_2.22.08_PM_1669681356817_0.DlvQ5xRq_Z2drLm4.webp&quot; srcset=&quot;https://briansunter.com/_astro/Screenshot_2022-11-28_at_2.22.08_PM_1669681356817_0.DlvQ5xRq_2dnbyb.webp 640w, https://briansunter.com/_astro/Screenshot_2022-11-28_at_2.22.08_PM_1669681356817_0.DlvQ5xRq_Z1NK3cs.webp 750w, https://briansunter.com/_astro/Screenshot_2022-11-28_at_2.22.08_PM_1669681356817_0.DlvQ5xRq_Z1yROhr.webp 828w, https://briansunter.com/_astro/Screenshot_2022-11-28_at_2.22.08_PM_1669681356817_0.DlvQ5xRq_Z2drLm4.webp 936w&quot; /&gt;&lt;figcaption&gt;Binary search tree with root 20&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;If searching for &lt;code&gt;15&lt;/code&gt;, start at root &lt;code&gt;20&lt;/code&gt;. Is 15 smaller? Yes, go left. Check &lt;code&gt;10&lt;/code&gt;. Is 15 larger? Yes, go right.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Best case&lt;/strong&gt;: Element is the root. Time is &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Worst case&lt;/strong&gt;: Element is a leaf. Time is the height of the tree, which is &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; for a balanced tree.&lt;/p&gt;
&lt;h3&gt;Unbalanced binary search tree&lt;/h3&gt;
&lt;figure&gt;&lt;img alt=&quot;Left-skewed binary search tree&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1052px) 1052px, 100vw&quot; width=&quot;1052&quot; height=&quot;1048&quot; src=&quot;https://briansunter.com/_astro/Screenshot_2022-11-28_at_2.28.42_PM_1669681918917_0.D3Oqr1ii_i5Ygu.webp&quot; srcset=&quot;https://briansunter.com/_astro/Screenshot_2022-11-28_at_2.28.42_PM_1669681918917_0.D3Oqr1ii_ZX9Hsa.webp 640w, https://briansunter.com/_astro/Screenshot_2022-11-28_at_2.28.42_PM_1669681918917_0.D3Oqr1ii_ZLXi9z.webp 750w, https://briansunter.com/_astro/Screenshot_2022-11-28_at_2.28.42_PM_1669681918917_0.D3Oqr1ii_1grjwI.webp 828w, https://briansunter.com/_astro/Screenshot_2022-11-28_at_2.28.42_PM_1669681918917_0.D3Oqr1ii_i5Ygu.webp 1052w&quot; /&gt;&lt;figcaption&gt;Left-skewed binary search tree&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;A binary tree can be unbalanced. This left-skewed tree has height n.&lt;/p&gt;
&lt;p&gt;Best case is still &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; when the element is at the root.&lt;/p&gt;
&lt;p&gt;However, worst case is &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; because the height is n, compared to &lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mop&quot;&gt;lo&lt;span style=&quot;margin-right:0.0139em&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; for a balanced tree.&lt;/p&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>How to manage projects in Logseq</title><link>https://briansunter.com/logseq-projects</link><guid isPermaLink="true">https://briansunter.com/logseq-projects</guid><description>How can we organize complex tasks that involve multiple steps over multiple days in Logseq?</description><pubDate>Sun, 21 Aug 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/beebob_checkmark_in_checkbox_app_eea7631b-472d-4e91-acba-590250d7106c_1672269960068_0.B0JE-e9W_1fQ2pQ.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;How can we organize complex tasks that involve multiple steps over multiple days in Logseq?&lt;/p&gt;
&lt;p&gt;I’ve been using Logseq as a “life operating system,” where I define what I want to work on, then execute on my tasks in priority order based on what Logseq tells me to do. Logseq allows you to create powerful automations to program your life with its queries and task management features.&lt;/p&gt;
&lt;p&gt;I use projects in Logseq to manage almost everything I work on. I make a project for any task that takes longer than a day. I have projects across a wide range of categories like fitness, programming, cooking, etc. For example, my newsletter is a project, and so is my current weightlifting routine.&lt;/p&gt;
&lt;p&gt;In this guide, I’ll share some of my thinking around projects, what I track, and how I manage everything in Logseq. The concepts translate to other tools as well.&lt;/p&gt;
&lt;h2&gt;Project Intro&lt;/h2&gt;
&lt;h3&gt;What is a project?&lt;/h3&gt;
&lt;p&gt;Logseq has a task management system that includes a checkbox you can put anywhere in your notes. This functions like the traditional “todo list app” you’re used to.&lt;/p&gt;
&lt;p&gt;Sometimes, I just need to remember to do a simple task, like picking up something on the way home:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;TODO pick up milk #cooking&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Other times, I’ll want to work on something more ambitious, usually taking between two weeks and three months to finish.&lt;/p&gt;
&lt;p&gt;An example of this would be “gain 100 newsletter subscribers”&lt;/p&gt;
&lt;p&gt;Your project has a “goal”, a long term timeline, and many different tasks that you need to do consistently.&lt;/p&gt;
&lt;h3&gt;Why projects?&lt;/h3&gt;
&lt;p&gt;Progress on developing your mental models starts with writing them down in detail, especially with life workflows.&lt;/p&gt;
&lt;p&gt;Writing down your processes gets them out of your head, where you can look at them and improve them.&lt;/p&gt;
&lt;p&gt;Writing down and reflecting on your progress forces you to be honest if you’re making progress.&lt;/p&gt;
&lt;p&gt;Working on multiple projects and balancing the time you work on them can be complicated. Sometimes I procrastinate on one project to avoid another.&lt;/p&gt;
&lt;p&gt;Logseq helps you create a prioritized “work feed” of all your active projects, so you can make sure none of them stall.&lt;/p&gt;
&lt;h3&gt;High level values and initiatives&lt;/h3&gt;
&lt;p&gt;Before starting tasks and taking notes, I think it’s worth doing some thinking about what your high-level values and priorities are, and writing them down.&lt;/p&gt;
&lt;p&gt;I try to attach each project to one of these high level goals.&lt;/p&gt;
&lt;p&gt;I do a detailed version of this as part of my yearly planning, but you can start with a simple list of what you currently want. Here are a few examples:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Lose weight&lt;/li&gt;
&lt;li&gt;Gain muscle&lt;/li&gt;
&lt;li&gt;Get better at programming&lt;/li&gt;
&lt;li&gt;Improve professional network&lt;/li&gt;
&lt;li&gt;Make more friends&lt;/li&gt;
&lt;li&gt;Travel more&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You may have completely different goals than me, and your values may change over time.&lt;/p&gt;
&lt;h2&gt;My Current Project Template&lt;/h2&gt;
&lt;p&gt;This is the template I use to generate projects in logseq.&lt;/p&gt;
&lt;p&gt;I’ll explain everything in the next section.&lt;/p&gt;
&lt;h3&gt;Project Template&lt;/h3&gt;
&lt;p&gt;Here’s the template I use in Logseq. You can copy this into your own graph:&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;markdown&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;template:: project&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;template-including-parent:: false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;type:: [[&lt;/span&gt;&lt;span style=&quot;color:#DBEDFF;text-decoration:underline&quot;&gt;project&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;]]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;status::&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;start::&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;milestone::&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;end::&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;related-goal::&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF;font-weight:bold&quot;&gt;## Summary&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF;font-weight:bold&quot;&gt;## Desired Output and Outcome&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF;font-weight:bold&quot;&gt;## Tasks&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF;font-weight:bold&quot;&gt;## Habits&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF;font-weight:bold&quot;&gt;## Templates&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF;font-weight:bold&quot;&gt;## Notes&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF;font-weight:bold&quot;&gt;## References&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF;font-weight:bold&quot;&gt;## Review&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF;font-weight:bold&quot;&gt;### What went well?&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF;font-weight:bold&quot;&gt;### What did not go well?&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF;font-weight:bold&quot;&gt;### What could I do better next time?&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h2&gt;Tour of My Project Template&lt;/h2&gt;
&lt;h3&gt;Summary&lt;/h3&gt;
&lt;p&gt;Each project has at least a 1 sentence summary of what it is and why it’s important&lt;/p&gt;
&lt;p&gt;This is useful for thinking about the project, and refreshing your memory if you return to it years later.&lt;/p&gt;
&lt;h3&gt;Status&lt;/h3&gt;
&lt;p&gt;Each project has a number of states&lt;/p&gt;
&lt;h4&gt;Unplanned&lt;/h4&gt;
&lt;p&gt;If there’s no state, the project is considered unplanned or in draft.&lt;/p&gt;
&lt;h4&gt;todo&lt;/h4&gt;
&lt;p&gt;After I’ve decided the project is defined and worthwhile, I mark the status as TODO.&lt;/p&gt;
&lt;h4&gt;NEXT&lt;/h4&gt;
&lt;p&gt;NEXT means this will be the project I work on next, after I finish one of my current projects&lt;/p&gt;
&lt;p&gt;This helps me prepare for upcoming projects.&lt;/p&gt;
&lt;h4&gt;DOING&lt;/h4&gt;
&lt;p&gt;This is a project I’m currently working on. I work on each active project every few days.&lt;/p&gt;
&lt;h4&gt;REVIEW&lt;/h4&gt;
&lt;p&gt;This means I’ve finished work on the project, and now am reflecting on the results.&lt;/p&gt;
&lt;p&gt;I plan to add a more extensive project review step, but for now I just spend some time reflecting on what the outcome was, what could have been improved, what I learned, and what I’ll do better next time.&lt;/p&gt;
&lt;h3&gt;Deadlines&lt;/h3&gt;
&lt;p&gt;I usually don’t take deadlines too seriously, but I almost always make projects timebound.&lt;/p&gt;
&lt;p&gt;I build in both a milestone checkin date half way through and a deadline&lt;/p&gt;
&lt;p&gt;Usually my projects last around 3 months&lt;/p&gt;
&lt;h4&gt;Start&lt;/h4&gt;
&lt;p&gt;The date I started working on the project&lt;/p&gt;
&lt;h4&gt;Milestone&lt;/h4&gt;
&lt;p&gt;Half way between the start and end date of the project&lt;/p&gt;
&lt;p&gt;I use this half way point to reflect on my progress&lt;/p&gt;
&lt;h4&gt;End&lt;/h4&gt;
&lt;p&gt;The intended end date of the project&lt;/p&gt;
&lt;p&gt;I adjust this if needed during the half way milestone&lt;/p&gt;
&lt;h3&gt;Metrics&lt;/h3&gt;
&lt;p&gt;If possible, I like to attach metrics to projects.&lt;/p&gt;
&lt;p&gt;If I’m doing a fitness project, I might take note of my lifting numbers and bodyweight.&lt;/p&gt;
&lt;p&gt;For example:&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;plaintext&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;squat:: 185 lbs&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;bench:: 135 lbs&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;deadlift:: 225 lbs&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;bodyweight:: 175 lbs&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3&gt;References&lt;/h3&gt;
&lt;p&gt;In this section, I capture any references or learning materials I may need&lt;/p&gt;
&lt;p&gt;When I find a relevant resource, I save it in my daily notes and tag it with the project. If the reference is especially good, I move it from my daily notes into this section when going through linked references.&lt;/p&gt;
&lt;h3&gt;Related long term goals&lt;/h3&gt;
&lt;p&gt;Each task is attached to a very high level long term goal&lt;/p&gt;
&lt;p&gt;I plan most of these as a part of my yearly planning.&lt;/p&gt;
&lt;p&gt;Examples include: lose weight, get better at programming, improve social life, etc.&lt;/p&gt;
&lt;h3&gt;Desired output&lt;/h3&gt;
&lt;p&gt;What do I want the result of this project to be? What would I be doing afterward?&lt;/p&gt;
&lt;p&gt;For example, for my weightlifting routine, I could say I want to squat 225 pounds. Or that I would feel healthier and fit into my old clothes.&lt;/p&gt;
&lt;h3&gt;Tasks&lt;/h3&gt;
&lt;p&gt;These are one time tasks I need to accomplish&lt;/p&gt;
&lt;p&gt;I usually add a lot of these before starting the project, but I continue to add more if needed.&lt;/p&gt;
&lt;p&gt;If I think of a necessary task for a project, I write it in my daily notes and tag the project, then pull it into this section later.&lt;/p&gt;
&lt;h3&gt;Habits&lt;/h3&gt;
&lt;p&gt;The main area of focus in my projects are on the habits.&lt;/p&gt;
&lt;p&gt;Many goals are accomplished by doing the same thing day after day.&lt;/p&gt;
&lt;p&gt;Logseq lets you schedule tasks that repeat daily, weekly, monthly, or whatever cadence you want.&lt;/p&gt;
&lt;p&gt;Some tasks I work on every day, but some I only work on every 3 days.&lt;/p&gt;
&lt;p&gt;See my logseq-tasks guide for more details&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;I hope you enjoyed this guide to my Logseq project template.&lt;/p&gt;
&lt;p&gt;If you’re working on something beyond simple todos, I highly recommend creating a structured process and project template around it. Feel free to use mine as a starting point.&lt;/p&gt;
&lt;p&gt;See my logseq-tasks guide for more details on task management in Logseq.&lt;/p&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator><category>blog</category></item><item><title>Notetaking with NLP and AI</title><link>https://briansunter.com/notetaking-with-ai</link><guid isPermaLink="true">https://briansunter.com/notetaking-with-ai</guid><description>Using GPT-3, embeddings, and other AI tools to organize and search your notes.</description><pubDate>Sun, 21 Aug 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/image_1662087221258_0.BbgvXhKI_A3to6.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;p&gt;There are several new AI and NLP technologies that you can use for personal knowledge management. I’ll go over a few useful AI techniques and how they differ from what we’ve seen before.&lt;/p&gt;
&lt;p&gt;The “Next Generation” “semantic search” technologies are more intelligent than we’ve seen before because they understand the meaning behind the text and not just the specific keywords they have in common.&lt;/p&gt;
&lt;p&gt;For example, I could search for “food” and find an article on “Burritos” even if the specific word “food” doesn’t appear in the “Burritos” article. Semantic Search enables a much more robust search because you don’t need to guess particular words to find the article you want, and you can search by meaning and intent.&lt;/p&gt;
&lt;p&gt;These new technologies allow you to search, summarize and categorize your notes. You can also use AI to generate new notes instead of just analyzing them.&lt;/p&gt;
&lt;p&gt;Here are a few of my favorite new techniques and technologies. Some of these you can use today, but many haven’t been built into any notes app. The big tech companies are using all these techniques, but the average user doesn’t know they exist.&lt;/p&gt;
&lt;h2&gt;Graph Analysis&lt;/h2&gt;
&lt;p&gt;Graph Analysis or graph theory studies graphs, which are relationships between objects. The main ideas are that “nodes” have connections to other nodes, and “edges” are the connections between nodes. You can imagine a social network with people and their friends.&lt;/p&gt;
&lt;p&gt;Graph Theory is handy for analyzing social networks. Graph theory can determine who the most influential members of a group are.&lt;/p&gt;
&lt;p&gt;Graph Theory can also be used to find relationships between your notes.&lt;/p&gt;
&lt;p&gt;This type of analysis works well for bidirectional note-taking apps with backlinks because the links provide a lot of information about the relationship between the notes. AI can then discover “hidden” relationships between notes.&lt;/p&gt;
&lt;h5&gt;Game of Thrones Social Network&lt;/h5&gt;
&lt;p&gt;Here’s what Game of Thrones would look like if it were a social network. You can see how all the characters such as “Jon Snow” and “Daenerys Targaryen” are connected.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;image&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 850px) 850px, 100vw&quot; width=&quot;850&quot; height=&quot;597&quot; src=&quot;https://briansunter.com/_astro/image_1662087210843_0.CqUKRyZP_1NWcr.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1662087210843_0.CqUKRyZP_2tvmcC.webp 640w, https://briansunter.com/_astro/image_1662087210843_0.CqUKRyZP_1nO9m2.webp 750w, https://briansunter.com/_astro/image_1662087210843_0.CqUKRyZP_2cTEDG.webp 828w, https://briansunter.com/_astro/image_1662087210843_0.CqUKRyZP_1NWcr.webp 850w&quot; /&gt;&lt;figcaption&gt;image&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;a href=&quot;https://www.researchgate.net/figure/Graph-theory-analysis-in-social-network-Image-courtesy-of-5_fig1_321846685&quot;&gt;Source&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Adamic Adar and “Link Prediction”&lt;/h3&gt;
&lt;p&gt;The Adamic–Adar index is a method to “predict” links in a social network according to the number of shared links between two nodes.&lt;/p&gt;
&lt;p&gt;Adamic-Adar is also a measure of how “similar” two notes in a graph are, even if you don’t link the notes directly.&lt;/p&gt;
&lt;p&gt;This technique can suggest new friends or pages on a social network based on your friends and interests.&lt;/p&gt;
&lt;p&gt;The technique could also suggest new links between notes, depending on the shared connections between them and their neighbors.&lt;/p&gt;
&lt;p&gt;This Adamic-Adar link prediction algorithm is implemented in the &lt;a href=&quot;https://github.com/trashhalo/logseq-graph-analysis&quot;&gt;Logseq graph analysis plugin&lt;/a&gt;.&lt;/p&gt;
&lt;h4&gt;It shows how similar notes are, even if they aren’t linked directly&lt;/h4&gt;
&lt;p&gt;These are notes closely related to “AWS VPC”.&lt;/p&gt;
&lt;p&gt;The size of the bubble shows the strength of the relationship.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;image&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 2012px) 2012px, 100vw&quot; width=&quot;2012&quot; height=&quot;1006&quot; src=&quot;https://briansunter.com/_astro/image_1662087221258_0.BbgvXhKI_Z2k8VjL.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1662087221258_0.BbgvXhKI_Z1z9TNT.webp 640w, https://briansunter.com/_astro/image_1662087221258_0.BbgvXhKI_R6BY4.webp 750w, https://briansunter.com/_astro/image_1662087221258_0.BbgvXhKI_Z1mzdwP.webp 828w, https://briansunter.com/_astro/image_1662087221258_0.BbgvXhKI_Z19vCJ9.webp 1080w, https://briansunter.com/_astro/image_1662087221258_0.BbgvXhKI_hn98t.webp 1280w, https://briansunter.com/_astro/image_1662087221258_0.BbgvXhKI_Z2isUer.webp 1668w, https://briansunter.com/_astro/image_1662087221258_0.BbgvXhKI_Z2k8VjL.webp 2012w&quot; /&gt;&lt;figcaption&gt;image&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h4&gt;It can find hidden relationships throughout your entire graph, even from very distant links&lt;/h4&gt;
&lt;p&gt;These are more distant notes related to “AWS VPC”.&lt;/p&gt;
&lt;p&gt;They don’t have any close links, but we can still detect that these ideas are related.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;image&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 2012px) 2012px, 100vw&quot; width=&quot;2012&quot; height=&quot;1036&quot; src=&quot;https://briansunter.com/_astro/image_1662087232057_0.DnwNto5b_Z2pTTEf.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1662087232057_0.DnwNto5b_Z28MYk1.webp 640w, https://briansunter.com/_astro/image_1662087232057_0.DnwNto5b_Z1Ed61b.webp 750w, https://briansunter.com/_astro/image_1662087232057_0.DnwNto5b_ZLnrdh.webp 828w, https://briansunter.com/_astro/image_1662087232057_0.DnwNto5b_Z2iqv21.webp 1080w, https://briansunter.com/_astro/image_1662087232057_0.DnwNto5b_ZfQIBW.webp 1280w, https://briansunter.com/_astro/image_1662087232057_0.DnwNto5b_Z2vR11O.webp 1668w, https://briansunter.com/_astro/image_1662087232057_0.DnwNto5b_Z2pTTEf.webp 2012w&quot; /&gt;&lt;figcaption&gt;image&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Adamic-Adar index is similar to a calculation called the Jaccard index, which is an older method of computing similarity.&lt;/p&gt;
&lt;h3&gt;Shortest Path&lt;/h3&gt;
&lt;p&gt;There are also algorithms for finding the shortest paths between your notes.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&quot;https://github.com/trashhalo/logseq-graph-analysis&quot;&gt;logseq graph analysis plugin&lt;/a&gt; has a good tool for exploring paths between notes.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;image&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1706px) 1706px, 100vw&quot; width=&quot;1706&quot; height=&quot;1532&quot; src=&quot;https://briansunter.com/_astro/image_1662087242684_0.CfZmvHoM_2sSt8n.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1662087242684_0.CfZmvHoM_STqNk.webp 640w, https://briansunter.com/_astro/image_1662087242684_0.CfZmvHoM_ZGrpO.webp 750w, https://briansunter.com/_astro/image_1662087242684_0.CfZmvHoM_1sNbTw.webp 828w, https://briansunter.com/_astro/image_1662087242684_0.CfZmvHoM_Z9ir9z.webp 1080w, https://briansunter.com/_astro/image_1662087242684_0.CfZmvHoM_Z2q8XNJ.webp 1280w, https://briansunter.com/_astro/image_1662087242684_0.CfZmvHoM_52YTI.webp 1668w, https://briansunter.com/_astro/image_1662087242684_0.CfZmvHoM_2sSt8n.webp 1706w&quot; /&gt;&lt;figcaption&gt;image&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;a href=&quot;https://twitter.com/trashhalo/status/1541809751344005121&quot;&gt;@trashhalo&lt;/a&gt;’s &lt;a href=&quot;https://github.com/trashhalo/logseq-graph-analysis&quot;&gt;logseq graph analysis plugin&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Co-Citations&lt;/h3&gt;
&lt;p&gt;Co-citation is the frequency with which two documents are cited together by other documents.&lt;/p&gt;
&lt;p&gt;If at least one other document cites two documents in common, these documents are said to be co-cited.&lt;/p&gt;
&lt;p&gt;The more co-citations two documents receive, the higher their co-citation strength and the more likely they are semantically related.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;image&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 425px) 425px, 100vw&quot; width=&quot;425&quot; height=&quot;234&quot; src=&quot;https://briansunter.com/_astro/image_1662087253522_0.CSZQgMhk_Z2lPT0Q.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1662087253522_0.CSZQgMhk_Z2lPT0Q.webp 425w&quot; /&gt;&lt;figcaption&gt;image&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Co-citation&quot;&gt;Wikipedia&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Community Detection&lt;/h3&gt;
&lt;figure&gt;&lt;img alt=&quot;image&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 700px) 700px, 100vw&quot; width=&quot;700&quot; height=&quot;385&quot; src=&quot;https://briansunter.com/_astro/image_1662087262978_0.DHHWbbrW_1iWVb3.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1662087262978_0.DHHWbbrW_ZjpWEL.webp 640w, https://briansunter.com/_astro/image_1662087262978_0.DHHWbbrW_1iWVb3.webp 700w&quot; /&gt;&lt;figcaption&gt;image&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;a href=&quot;https://towardsdatascience.com/community-detection-algorithms-9bd8951e7dae&quot;&gt;Community Detection Algorithms&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Community detection can be used in machine learning to detect groups with similar properties and extract groups.&lt;/p&gt;
&lt;p&gt;A community is a set of nodes that are densely connected&lt;/p&gt;
&lt;p&gt;Community detection is similar to clustering. Clustering is a general machine learning technique in which similar data points are grouped into the same cluster based on their attributes.&lt;/p&gt;
&lt;p&gt;Community detection is &lt;strong&gt;specifically tailored for network analysis&lt;/strong&gt; and depends on a &lt;strong&gt;single attribute type called edges&lt;/strong&gt;. The clustering you’ve seen before was likely simpler and based on direct attributes.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://towardsdatascience.com/community-detection-algorithms-9bd8951e7dae&quot;&gt;See this guide to Community Detection Algorithms for more&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Label Propagation&lt;/h3&gt;
&lt;figure&gt;&lt;img alt=&quot;image&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 700px) 700px, 100vw&quot; width=&quot;700&quot; height=&quot;367&quot; src=&quot;https://briansunter.com/_astro/image_1662087274720_0.BP7yeKF9_H8TsD.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1662087274720_0.BP7yeKF9_1cTAxN.webp 640w, https://briansunter.com/_astro/image_1662087274720_0.BP7yeKF9_H8TsD.webp 700w&quot; /&gt;&lt;figcaption&gt;image&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Original image by &lt;a href=&quot;https://pixabay.com/users/GDJ-1086657/?utm_source=link-attribution&amp;amp;utm_medium=referral&amp;amp;utm_campaign=image&amp;amp;utm_content=3846597&quot;&gt;Gordon Johnson&lt;/a&gt; from &lt;a href=&quot;https://pixabay.com/?utm_source=link-attribution&amp;amp;utm_medium=referral&amp;amp;utm_campaign=image&amp;amp;utm_content=3846597&quot;&gt;Pixabay&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Given a “label” like “liking cricket,” can we predict how likely someone is to like cricket based on their friends?&lt;/p&gt;
&lt;p&gt;&lt;em&gt;See “Label Propagation Demystified” (Towards Data Science, no longer available) for more.&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;Summarization&lt;/h2&gt;
&lt;figure&gt;&lt;img alt=&quot;image&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1280px) 1280px, 100vw&quot; width=&quot;1280&quot; height=&quot;720&quot; src=&quot;https://briansunter.com/_astro/image_1662087287500_0.BiYgnE71_ZPpdJo.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1662087287500_0.BiYgnE71_Z2d9FOW.webp 640w, https://briansunter.com/_astro/image_1662087287500_0.BiYgnE71_1R2Xe9.webp 750w, https://briansunter.com/_astro/image_1662087287500_0.BiYgnE71_8vtyo.webp 828w, https://briansunter.com/_astro/image_1662087287500_0.BiYgnE71_awkg1.webp 1080w, https://briansunter.com/_astro/image_1662087287500_0.BiYgnE71_ZPpdJo.webp 1280w&quot; /&gt;&lt;figcaption&gt;image&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;a href=&quot;https://www.machinelearningplus.com/nlp/text-summarization-approaches-nlp-example/&quot;&gt;Source&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Summarization is summarizing information in large texts for quicker consumption.&lt;/p&gt;
&lt;p&gt;It is my favorite area of research, and I’ve found it endlessly helpful in consuming more information and learning more effectively. It’s easier to remember what you read if you have a summary of the source material in your notes.&lt;/p&gt;
&lt;p&gt;There are two types of machine summarization: &lt;strong&gt;Extractive&lt;/strong&gt; (the old way, based on keywords) and &lt;strong&gt;Abstractive&lt;/strong&gt; (the new way, based on meaning).&lt;/p&gt;
&lt;p&gt;The older extractive methods are fast and free, but the new abstractive methods produce beautiful summaries that are original explanations instead of just key sentences pulled from the article.&lt;/p&gt;
&lt;h3&gt;Extractive Summarization&lt;/h3&gt;
&lt;p&gt;Extractive summarization is the traditional method that pulls out the most significant sentences in a document.&lt;/p&gt;
&lt;p&gt;The summary from Extractive Summarization is written using almost the same sentences from the original text.&lt;/p&gt;
&lt;h4&gt;TextRank&lt;/h4&gt;
&lt;p&gt;TextRank is an extractive summarization technique.&lt;/p&gt;
&lt;p&gt;TextRank is based on the idea that words which occur more frequently are significant. Therefore, sentences containing highly frequent words are important.&lt;/p&gt;
&lt;p&gt;It is similar to Google’s PageRank algorithm, which decides the websites to show you in search based on how many other pages link to that website.&lt;/p&gt;
&lt;p&gt;Other methods are based on this same idea, including “Inverse Document Frequency,” which ranks the importance of words based on how “rare” they are in other documents.&lt;/p&gt;
&lt;h3&gt;Abstractive Summarization&lt;/h3&gt;
&lt;p&gt;Abstract summarization is a state-of-the-art method that rephrases the text and generates new original phrases.&lt;/p&gt;
&lt;p&gt;Some examples of AI “models” or programs that can do this are Open AI’s GPT-3, Facebooks BERT, and Google’s T5.&lt;/p&gt;
&lt;p&gt;These can turn long articles into excellent summaries that explain the essential concepts in a few words, even using terms that don’t appear in the original article in its explanation.&lt;/p&gt;
&lt;p&gt;These new tools show an “understanding” of the text, how it relates to other topics, and how to create a custom-tailored explanation of the text.&lt;/p&gt;
&lt;p&gt;Out of all these, the best by far is OpenAI’s GPT-3, but it is expensive.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.machinelearningplus.com/nlp/text-summarization-approaches-nlp-example/&quot;&gt;For more, read here&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Semantic Search and Vector Embeddings&lt;/h2&gt;
&lt;h3&gt;Semantic Search&lt;/h3&gt;
&lt;p&gt;“Semantic Search” is a way of searching documents by meaning instead of just keywords.&lt;/p&gt;
&lt;p&gt;For example, you could search for pages on food, and a page on burritos would appear, even if the burrito page never mentions the specific word “food.”&lt;/p&gt;
&lt;p&gt;Most techniques around semantic search involve breaking down the text into “vector embeddings,” which are representations that can be searched in systems like “vector databases.”&lt;/p&gt;
&lt;h3&gt;Vector Embeddings&lt;/h3&gt;
&lt;p&gt;Vector embeddings are central to many NLP, recommendation, and search algorithms.&lt;/p&gt;
&lt;p&gt;Vector embeddings are just lists of numbers that have special meaning relative to other vectors.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;image&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 562px) 562px, 100vw&quot; width=&quot;562&quot; height=&quot;257&quot; src=&quot;https://briansunter.com/_astro/image_1662087297419_0.CSiAP1t5_Z1H7ksT.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1662087297419_0.CSiAP1t5_Z1H7ksT.webp 562w&quot; /&gt;&lt;figcaption&gt;image&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Google invented a tool called “Word2Vec” which converts text into n-dimensional vector coordinates. You can plot these words in visual space 3D to see words with similar “meaning” nearby&lt;/p&gt;
&lt;p&gt;For example, words like “king” and “queen” and “prince” will all cluster together. Same with synonyms (“walked,” “strolled,” “jogged”).&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;image&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1000px) 1000px, 100vw&quot; width=&quot;1000&quot; height=&quot;350&quot; src=&quot;https://briansunter.com/_astro/image_1662087305440_0.Cb56--Rg_cyq8B.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1662087305440_0.Cb56--Rg_1ja3u5.webp 640w, https://briansunter.com/_astro/image_1662087305440_0.Cb56--Rg_29K9EN.webp 750w, https://briansunter.com/_astro/image_1662087305440_0.Cb56--Rg_ZhbA1u.webp 828w, https://briansunter.com/_astro/image_1662087305440_0.Cb56--Rg_cyq8B.webp 1000w&quot; /&gt;&lt;figcaption&gt;image&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;a href=&quot;https://www.tensorflow.org/tutorials/representation/word2vec&quot;&gt;Source&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;We can use tools to explore the similarity of these words in 3D space.&lt;/p&gt;
&lt;h4&gt;Exploring Similar Words in 3D Space&lt;/h4&gt;
&lt;p&gt;Words most similar to “football” in meaning&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;football&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 965px) 965px, 100vw&quot; width=&quot;965&quot; height=&quot;665&quot; src=&quot;https://briansunter.com/_astro/football_1672273858980_0.BravD0jx_1sGEJH.webp&quot; srcset=&quot;https://briansunter.com/_astro/football_1672273858980_0.BravD0jx_1PGJjv.webp 640w, https://briansunter.com/_astro/football_1672273858980_0.BravD0jx_PXGa1.webp 750w, https://briansunter.com/_astro/football_1672273858980_0.BravD0jx_Z1zIIQJ.webp 828w, https://briansunter.com/_astro/football_1672273858980_0.BravD0jx_1sGEJH.webp 965w&quot; /&gt;&lt;figcaption&gt;football&lt;/figcaption&gt;&lt;/figure&gt;

  &lt;div class=&quot;not-prose tweet-embed&quot;&gt;
    &lt;div class=&quot;tweet-card&quot;&gt;
      &lt;a href=&quot;https://twitter.com/Bsunter/status/1543295071860035584&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;&lt;/a&gt;
      &lt;div class=&quot;tweet-header&quot;&gt;
        &lt;div class=&quot;tweet-author&quot;&gt;
          &lt;img src=&quot;https://pbs.twimg.com/profile_images/507230915458646016/POGcr0En_normal.jpeg&quot; alt=&quot;Brian Sunter&apos;s avatar&quot; /&gt;
          &lt;div class=&quot;tweet-author-info&quot;&gt;
            &lt;a href=&quot;https://twitter.com/Bsunter/status/1543295071860035584&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
              &lt;div class=&quot;tweet-author-name-row&quot;&gt;
                &lt;span class=&quot;tweet-author-name&quot;&gt;Brian Sunter&lt;/span&gt;
                

  


              &lt;/div&gt;
            &lt;/a&gt;
            &lt;span class=&quot;tweet-author-handle&quot;&gt;@Bsunter&lt;/span&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;a href=&quot;https://twitter.com/Bsunter/status/1543295071860035584&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;

  
    
  

&lt;/a&gt;
      &lt;/div&gt;
      
      &lt;div class=&quot;tweet-body&quot;&gt;Now I&apos;m obsessed with Word2vec, which allows you to show how words and &quot;concepts&quot; are related to each other in 3D space.

I want a 3d &lt;a href=&quot;https://twitter.com/logseq&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;@logseq&lt;/a&gt; graph explorer that groups notes with similar meaning together in 3d space https://t.co/duNXmFuIKK&lt;/div&gt;
      
      
    &lt;div class=&quot;tweet-video-container&quot;&gt;
      &lt;video controls preload=&quot;metadata&quot; poster=&quot;https://pbs.twimg.com/ext_tw_video_thumb/1543294647509737472/pu/img/WR8MDbgL5GYKAS-k.jpg&quot;&gt;
        &lt;source src=&quot;https://video.twimg.com/ext_tw_video/1543294647509737472/pu/vid/820x720/0_1dJZadHZ5kxjGA.mp4?tag=12&quot; type=&quot;video/mp4&quot;&gt;&lt;/source&gt;
        Your browser does not support the video tag.
      &lt;/video&gt;
      &lt;a href=&quot;https://twitter.com/Bsunter/status/1543295071860035584&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
        &lt;span class=&quot;tweet-video-fallback-text&quot;&gt;Click to watch on X&lt;/span&gt;
      &lt;/a&gt;
    &lt;/div&gt;
      &lt;a href=&quot;https://twitter.com/Bsunter/status/1543295071860035584&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
        &lt;span class=&quot;tweet-timestamp&quot;&gt;Jul 2, 2022, 6:06 PM&lt;/span&gt;
      &lt;/a&gt;
      &lt;hr /&gt;
      &lt;div class=&quot;tweet-actions&quot;&gt;
        &lt;div class=&quot;tweet-action tweet-action-like&quot;&gt;
          

  
    
  


          &lt;span&gt;75&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class=&quot;tweet-action tweet-action-reply&quot;&gt;
          

  
    
  


          &lt;span&gt;13&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  
&lt;p&gt;Words Similar to “guitar”&lt;/p&gt;

  &lt;div class=&quot;not-prose tweet-embed&quot;&gt;
    &lt;div class=&quot;tweet-card&quot;&gt;
      &lt;a href=&quot;https://twitter.com/Bsunter/status/1543295726402187264&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;&lt;/a&gt;
      &lt;div class=&quot;tweet-header&quot;&gt;
        &lt;div class=&quot;tweet-author&quot;&gt;
          &lt;img src=&quot;https://pbs.twimg.com/profile_images/507230915458646016/POGcr0En_normal.jpeg&quot; alt=&quot;Brian Sunter&apos;s avatar&quot; /&gt;
          &lt;div class=&quot;tweet-author-info&quot;&gt;
            &lt;a href=&quot;https://twitter.com/Bsunter/status/1543295726402187264&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
              &lt;div class=&quot;tweet-author-name-row&quot;&gt;
                &lt;span class=&quot;tweet-author-name&quot;&gt;Brian Sunter&lt;/span&gt;
                

  


              &lt;/div&gt;
            &lt;/a&gt;
            &lt;span class=&quot;tweet-author-handle&quot;&gt;@Bsunter&lt;/span&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;a href=&quot;https://twitter.com/Bsunter/status/1543295726402187264&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;

  
    
  

&lt;/a&gt;
      &lt;/div&gt;
      
      &lt;div class=&quot;tweet-body&quot;&gt;&lt;a href=&quot;https://twitter.com/logseq&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;@logseq&lt;/a&gt; Zooming around all concepts similar to &quot;guitar&quot; in the word cloud. The 300 most similar concepts to guitar are highlighted in yellow. https://t.co/B7vbcddOrb&lt;/div&gt;
      
      
    &lt;div class=&quot;tweet-video-container&quot;&gt;
      &lt;video controls preload=&quot;metadata&quot; poster=&quot;https://pbs.twimg.com/ext_tw_video_thumb/1543295287971631104/pu/img/r7nmcPi_OhbtFJgJ.jpg&quot;&gt;
        &lt;source src=&quot;https://video.twimg.com/ext_tw_video/1543295287971631104/pu/vid/820x720/-ne3OEEJRjfAokmg.mp4?tag=12&quot; type=&quot;video/mp4&quot;&gt;&lt;/source&gt;
        Your browser does not support the video tag.
      &lt;/video&gt;
      &lt;a href=&quot;https://twitter.com/Bsunter/status/1543295726402187264&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
        &lt;span class=&quot;tweet-video-fallback-text&quot;&gt;Click to watch on X&lt;/span&gt;
      &lt;/a&gt;
    &lt;/div&gt;
      &lt;a href=&quot;https://twitter.com/Bsunter/status/1543295726402187264&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
        &lt;span class=&quot;tweet-timestamp&quot;&gt;Jul 2, 2022, 6:09 PM&lt;/span&gt;
      &lt;/a&gt;
      &lt;hr /&gt;
      &lt;div class=&quot;tweet-actions&quot;&gt;
        &lt;div class=&quot;tweet-action tweet-action-like&quot;&gt;
          

  
    
  


          &lt;span&gt;9&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class=&quot;tweet-action tweet-action-reply&quot;&gt;
          

  
    
  


          &lt;span&gt;1&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  
&lt;h5&gt;All Words&lt;/h5&gt;

  &lt;div class=&quot;not-prose tweet-embed&quot;&gt;
    &lt;div class=&quot;tweet-card&quot;&gt;
      &lt;a href=&quot;https://twitter.com/Bsunter/status/1543323775185235968&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;&lt;/a&gt;
      &lt;div class=&quot;tweet-header&quot;&gt;
        &lt;div class=&quot;tweet-author&quot;&gt;
          &lt;img src=&quot;https://pbs.twimg.com/profile_images/507230915458646016/POGcr0En_normal.jpeg&quot; alt=&quot;Brian Sunter&apos;s avatar&quot; /&gt;
          &lt;div class=&quot;tweet-author-info&quot;&gt;
            &lt;a href=&quot;https://twitter.com/Bsunter/status/1543323775185235968&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
              &lt;div class=&quot;tweet-author-name-row&quot;&gt;
                &lt;span class=&quot;tweet-author-name&quot;&gt;Brian Sunter&lt;/span&gt;
                

  


              &lt;/div&gt;
            &lt;/a&gt;
            &lt;span class=&quot;tweet-author-handle&quot;&gt;@Bsunter&lt;/span&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;a href=&quot;https://twitter.com/Bsunter/status/1543323775185235968&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;

  
    
  

&lt;/a&gt;
      &lt;/div&gt;
      
      &lt;div class=&quot;tweet-body&quot;&gt;The &quot;cloud view&quot; of every word2vec word is cool. https://t.co/TNOHiiagvx&lt;/div&gt;
      
      
    &lt;div class=&quot;tweet-video-container&quot;&gt;
      &lt;video controls preload=&quot;metadata&quot; poster=&quot;https://pbs.twimg.com/ext_tw_video_thumb/1543323125693108225/pu/img/U5golx_DtmhLtiUA.jpg&quot;&gt;
        &lt;source src=&quot;https://video.twimg.com/ext_tw_video/1543323125693108225/pu/vid/820x720/8mG3FwgmWX0bwjIO.mp4?tag=12&quot; type=&quot;video/mp4&quot;&gt;&lt;/source&gt;
        Your browser does not support the video tag.
      &lt;/video&gt;
      &lt;a href=&quot;https://twitter.com/Bsunter/status/1543323775185235968&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
        &lt;span class=&quot;tweet-video-fallback-text&quot;&gt;Click to watch on X&lt;/span&gt;
      &lt;/a&gt;
    &lt;/div&gt;
      &lt;a href=&quot;https://twitter.com/Bsunter/status/1543323775185235968&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
        &lt;span class=&quot;tweet-timestamp&quot;&gt;Jul 2, 2022, 8:00 PM&lt;/span&gt;
      &lt;/a&gt;
      &lt;hr /&gt;
      &lt;div class=&quot;tweet-actions&quot;&gt;
        &lt;div class=&quot;tweet-action tweet-action-like&quot;&gt;
          

  
    
  


          &lt;span&gt;2&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class=&quot;tweet-action tweet-action-reply&quot;&gt;
          

  
    
  


          &lt;span&gt;1&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  
&lt;h5&gt;Handwritten numbers&lt;/h5&gt;
&lt;p&gt;Handwritten numbers are shown in terms of visual similarity to each-other&lt;/p&gt;
&lt;p&gt;You can see that “7” is similar to “9”, so these numbers are grouped closely together in 3D space.&lt;/p&gt;

  &lt;div class=&quot;not-prose tweet-embed&quot;&gt;
    &lt;div class=&quot;tweet-card&quot;&gt;
      &lt;a href=&quot;https://twitter.com/Bsunter/status/1543323996644487168&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;&lt;/a&gt;
      &lt;div class=&quot;tweet-header&quot;&gt;
        &lt;div class=&quot;tweet-author&quot;&gt;
          &lt;img src=&quot;https://pbs.twimg.com/profile_images/507230915458646016/POGcr0En_normal.jpeg&quot; alt=&quot;Brian Sunter&apos;s avatar&quot; /&gt;
          &lt;div class=&quot;tweet-author-info&quot;&gt;
            &lt;a href=&quot;https://twitter.com/Bsunter/status/1543323996644487168&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
              &lt;div class=&quot;tweet-author-name-row&quot;&gt;
                &lt;span class=&quot;tweet-author-name&quot;&gt;Brian Sunter&lt;/span&gt;
                

  


              &lt;/div&gt;
            &lt;/a&gt;
            &lt;span class=&quot;tweet-author-handle&quot;&gt;@Bsunter&lt;/span&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;a href=&quot;https://twitter.com/Bsunter/status/1543323996644487168&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;

  
    
  

&lt;/a&gt;
      &lt;/div&gt;
      
      &lt;div class=&quot;tweet-body&quot;&gt;I love looking at the handwritten numbers in 3d similarity space. You can see that &quot;7&quot; is close to &quot;9&quot; because it looks visually similar. https://t.co/bwj9aAERgO&lt;/div&gt;
      
      
    &lt;div class=&quot;tweet-video-container&quot;&gt;
      &lt;video controls preload=&quot;metadata&quot; poster=&quot;https://pbs.twimg.com/ext_tw_video_thumb/1543323477440008192/pu/img/THaVDbeJz-L791ss.jpg&quot;&gt;
        &lt;source src=&quot;https://video.twimg.com/ext_tw_video/1543323477440008192/pu/vid/820x720/uCdgZJxKrNMloLn1.mp4?tag=12&quot; type=&quot;video/mp4&quot;&gt;&lt;/source&gt;
        Your browser does not support the video tag.
      &lt;/video&gt;
      &lt;a href=&quot;https://twitter.com/Bsunter/status/1543323996644487168&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
        &lt;span class=&quot;tweet-video-fallback-text&quot;&gt;Click to watch on X&lt;/span&gt;
      &lt;/a&gt;
    &lt;/div&gt;
      &lt;a href=&quot;https://twitter.com/Bsunter/status/1543323996644487168&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
        &lt;span class=&quot;tweet-timestamp&quot;&gt;Jul 2, 2022, 8:01 PM&lt;/span&gt;
      &lt;/a&gt;
      &lt;hr /&gt;
      &lt;div class=&quot;tweet-actions&quot;&gt;
        &lt;div class=&quot;tweet-action tweet-action-like&quot;&gt;
          

  
    
  


          &lt;span&gt;3&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class=&quot;tweet-action tweet-action-reply&quot;&gt;
          

  
    
  


          &lt;span&gt;0&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  
&lt;h2&gt;GPT-3 and Large Language Models&lt;/h2&gt;
&lt;p&gt;GPT-3 is a model made by OpenAI, based on a “transformer architecture.” GPT-3 was trained in an unsupervised manner on a large amount of text gathered online.&lt;/p&gt;
&lt;p&gt;GPT-3 works by predicting the next word given a sequence of words.&lt;/p&gt;
&lt;p&gt;It can do many tasks it hasn’t been trained to do.&lt;/p&gt;
&lt;p&gt;The most powerful thing about GPT-3, is that given a few examples of a new task, it can quickly learn how to do it.&lt;/p&gt;
&lt;p&gt;For example, you can ask:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;“I love you → Te quiero.
I have a lot of work → Tengo mucho trabajo.
GPT-3 is the best AI system ever → &lt;strong&gt;_&lt;/strong&gt;.”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;And it will know to translate the sentence into Spanish.&lt;/p&gt;
&lt;p&gt;According to studies, it can generate “news articles” on a given topic that humans can barely distinguish as being written by AI.&lt;/p&gt;
&lt;p&gt;It can do many different things, given a “prompt,” just an English language description of what you want to do.&lt;/p&gt;
&lt;p&gt;Most AI until now has focused on analysis, but I’m excited by the generative capabilities of new AI like GPT-3.&lt;/p&gt;
&lt;p&gt;Using the &lt;a href=&quot;https://platform.openai.com/docs/guides/fine-tuning&quot;&gt;OpenAI Fine Tuning API&lt;/a&gt;,we can build very powerful “prompts”&lt;/p&gt;
&lt;h3&gt;OpenAI Embeddings&lt;/h3&gt;
&lt;p&gt;OpenAI also has a system to process text and images into “vector embeddings” that can be used in NLP and machine learning algorithms.
One exciting thing about OpenAI is its method processes text and images into the same 3d space. That means that you can see how similar conceptually words are to images and vice versa.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://towardsdatascience.com/gpt-3-a-complete-overview-190232eb25fd&quot;&gt;For more, read here&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Traditional NLP&lt;/h2&gt;
&lt;p&gt;You can still accomplish much with older techniques that look more at words than conceptually.&lt;/p&gt;
&lt;p&gt;These methods are cheaper and faster, so they should be used whenever possible.&lt;/p&gt;
&lt;h3&gt;Sentiment Analysis&lt;/h3&gt;
&lt;p&gt;Sentiment analysis detects the emotion of the text and grades it as positive or negative.&lt;/p&gt;
&lt;p&gt;For example, just by reading your movie review, a machine can tell if you liked it or not.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;image&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 2048px) 2048px, 100vw&quot; width=&quot;2048&quot; height=&quot;803&quot; src=&quot;https://briansunter.com/_astro/image_1662087315783_0.Cpdh9r5b_Z2gdGFy.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1662087315783_0.Cpdh9r5b_Z2lWznU.webp 640w, https://briansunter.com/_astro/image_1662087315783_0.Cpdh9r5b_Z1qMHzv.webp 750w, https://briansunter.com/_astro/image_1662087315783_0.Cpdh9r5b_Kh0lx.webp 828w, https://briansunter.com/_astro/image_1662087315783_0.Cpdh9r5b_1QuSEG.webp 1080w, https://briansunter.com/_astro/image_1662087315783_0.Cpdh9r5b_1ytzBz.webp 1280w, https://briansunter.com/_astro/image_1662087315783_0.Cpdh9r5b_Z1apEoJ.webp 1668w, https://briansunter.com/_astro/image_1662087315783_0.Cpdh9r5b_Z2gdGFy.webp 2048w&quot; /&gt;&lt;figcaption&gt;image&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;a href=&quot;https://www.expressanalytics.com/blog/social-media-sentiment-analysis&quot;&gt;Source&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Entity Recognition&lt;/h3&gt;
&lt;p&gt;You can use NLP to extract “important” things from plain text, such as person names, organizations, locations, time, etc.&lt;/p&gt;
&lt;p&gt;This could pull certain critical pieces of information out of your notes like peoples, places, emails, etc.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;image&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1297px) 1297px, 100vw&quot; width=&quot;1297&quot; height=&quot;643&quot; src=&quot;https://briansunter.com/_astro/image_1662087323103_0.CroXbf8v_D6Ty4.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1662087323103_0.CroXbf8v_Z1rgj0Y.webp 640w, https://briansunter.com/_astro/image_1662087323103_0.CroXbf8v_tzRlI.webp 750w, https://briansunter.com/_astro/image_1662087323103_0.CroXbf8v_Z1Rxc5l.webp 828w, https://briansunter.com/_astro/image_1662087323103_0.CroXbf8v_Z1EK1Gy.webp 1080w, https://briansunter.com/_astro/image_1662087323103_0.CroXbf8v_1ybtAq.webp 1280w, https://briansunter.com/_astro/image_1662087323103_0.CroXbf8v_D6Ty4.webp 1297w&quot; /&gt;&lt;figcaption&gt;image&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;a href=&quot;https://umagunturi789.medium.com/everything-you-need-to-know-about-named-entity-recognition-2a136f38c08f&quot;&gt;Source&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Text Classification&lt;/h3&gt;
&lt;p&gt;Text can be organized into groups, either by simple rules or statistics.&lt;/p&gt;
&lt;p&gt;One example of simple machine-based classification is a “bag of words” representation, the number of times each word occurs in the text.&lt;/p&gt;
&lt;p&gt;You could imagine using this to suggest backlinks in your notes or finding similar notes.&lt;/p&gt;
&lt;h3&gt;Keyword Extraction&lt;/h3&gt;
&lt;p&gt;Keyword extraction algorithms like TextRank allow you to find the essential words in a text and how they’re related.&lt;/p&gt;
&lt;p&gt;These are also good ideas for backlinks or similar pages.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;image&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 836px) 836px, 100vw&quot; width=&quot;836&quot; height=&quot;574&quot; src=&quot;https://briansunter.com/_astro/image_1662087346012_0.BVeIEhx__tT774.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1662087346012_0.BVeIEhx__xFsYT.webp 640w, https://briansunter.com/_astro/image_1662087346012_0.BVeIEhx__rKzdp.webp 750w, https://briansunter.com/_astro/image_1662087346012_0.BVeIEhx__Z1Q4Nu1.webp 828w, https://briansunter.com/_astro/image_1662087346012_0.BVeIEhx__tT774.webp 836w&quot; /&gt;&lt;figcaption&gt;image&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Source: &lt;em&gt;TextRank for Keyword Extraction by Python&lt;/em&gt; (Towards Data Science, no longer available)&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;I hope you enjoyed this overview of NLP and AI techniques relevant to note-taking.&lt;/p&gt;
&lt;p&gt;Most big tech companies already heavily use these ideas, but I hope individuals find ways to adapt the latest AI techniques to their needs.&lt;/p&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator><category>blog</category></item><item><title>New Website on Logseq Hugo</title><link>https://briansunter.com/new-website-on-logseq-hugo</link><guid isPermaLink="true">https://briansunter.com/new-website-on-logseq-hugo</guid><description>I&apos;ve remade my website using Logseq and the Hugo static site generator.</description><pubDate>Fri, 19 Aug 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;I’ve remade my website using Logseq and the Hugo static site generator.&lt;/p&gt;
&lt;p&gt;I write all my posts in Logseq and use the &lt;a href=&quot;https://github.com/sawhney17/logseq-schrodinger&quot;&gt;Schrodinger plugin&lt;/a&gt; to convert the Logseq pages into &lt;a href=&quot;https://gohugo.io/&quot;&gt;Hugo&lt;/a&gt;-compatible markdown files.&lt;/p&gt;
&lt;p&gt;After I export my Logseq pages as Hugo markdown files, I use Hugo to convert them to HTML and upload them to AWS CloudFront, where I host my site.&lt;/p&gt;
&lt;p&gt;Here is the link to my public graph https://github.com/briansunter/graph&lt;/p&gt;
&lt;h3&gt;Motivation&lt;/h3&gt;
&lt;p&gt;I want to start posting my Logseq notes and blog posts online&lt;/p&gt;
&lt;p&gt;I want to host these on my site, where they can stay up forever, instead of just on Twitter, Facebook, Reddit, etc. where they will eventually be paywalled or deleted.&lt;/p&gt;
&lt;p&gt;I also want to make publishing on my site as easy as possible. Managing my notes as well as my public site in Logseq is very convenient and lets me quickly push new content.&lt;/p&gt;
&lt;p&gt;I write everything in Logseq, export using the Hugo plugin, push it to GitHub, and my site is deployed in just a few minutes. It is very easy to publish new content.&lt;/p&gt;
&lt;h3&gt;New Site - Motivations&lt;/h3&gt;
&lt;p&gt;When I first started my website a long time ago, I used WordPress, and since then I’ve moved to static site generators. I’ve used Hugo, Jekyll, Eleventy, and now Logseq + Hugo.&lt;/p&gt;
&lt;p&gt;I’ve spent a lot of time hand tuning static site generators, but decided I wanted something more “hands off” and that worked out of the box.&lt;/p&gt;
&lt;p&gt;I was using a highly customized eleventy static site, but it was a lot of maintenance and was slow to build my site. I wanted something fast and easy to use.&lt;/p&gt;
&lt;p&gt;Hugo, along with the PaperMod theme does everything my old site did, including image optimization, but is mostly zero config and super fast. Plus, I enjoy the theme and layout of the plugin.&lt;/p&gt;
&lt;p&gt;I was publishing an interactive graph using the Logseq built-in export feature, but I couldn’t get it to work with SEO. Later on, I plan on publishing my full interactive graph again, but for now, I’m focusing on the static site.&lt;/p&gt;
&lt;h3&gt;Considerations&lt;/h3&gt;
&lt;h4&gt;Zero Config&lt;/h4&gt;
&lt;p&gt;I’m tired of messing with build settings and optimizing images. I want to just write my posts and have them automatically optimized and published.&lt;/p&gt;
&lt;p&gt;Hugo has a large community and many libraries that do everything I want out of the box&lt;/p&gt;
&lt;p&gt;This includes image optimization, RSS feeds, and more.&lt;/p&gt;
&lt;h4&gt;Fast to Build&lt;/h4&gt;
&lt;p&gt;My handmade setup with Eleventy was slow to publish.&lt;/p&gt;
&lt;p&gt;Hugo is extremely fast&lt;/p&gt;
&lt;h4&gt;Easy to Publish New Entries&lt;/h4&gt;
&lt;p&gt;I want to reduce the friction of publishing new notes as much as possible.&lt;/p&gt;
&lt;p&gt;I’m already writing my notes in Logseq, so being able to clean up these notes and publish them within Logseq makes it effortless to make new posts.&lt;/p&gt;
&lt;p&gt;I can write a new post in Logseq, export it as a Hugo markdown file, push to GitHub, and my site is deployed in just a few minutes.&lt;/p&gt;
&lt;h4&gt;No Maintenance and Cheap&lt;/h4&gt;
&lt;p&gt;I want to host my site for less than a few dollars per month and not ever have to adjust it&lt;/p&gt;
&lt;p&gt;I set up this site to deploy to AWS S3 and CloudFront, which is cheap and doesn’t require any maintenance.&lt;/p&gt;
&lt;p&gt;I also set up a GitHub action to automatically deploy my site whenever I push to GitHub.&lt;/p&gt;
&lt;h4&gt;Will be Around Forever&lt;/h4&gt;
&lt;p&gt;I want to make sure every link to my site continues to work forever.&lt;/p&gt;
&lt;p&gt;I plan to host the site under my name and maintain every link for as long as possible.&lt;/p&gt;
&lt;p&gt;I’m using the Logseq static site plugin so I can customize the permalink.&lt;/p&gt;
&lt;p&gt;I’m also using the Hugo static site generator, which is very popular and will be around for a long time.&lt;/p&gt;
&lt;h4&gt;SEO&lt;/h4&gt;
&lt;p&gt;Being discoverable on Google is huge, and having a static site instead of a single-page app seems to work better.&lt;/p&gt;
&lt;p&gt;SEO is part of the reason I’m using Hugo instead of Logseq’s built-in export feature.&lt;/p&gt;
&lt;p&gt;I get a surprising amount of traffic from Google searches, and I want to keep that up.&lt;/p&gt;
&lt;h4&gt;Open Source&lt;/h4&gt;
&lt;p&gt;I want all the content, even the work in progress to be open source on GitHub.&lt;/p&gt;
&lt;p&gt;I’m pushing the Logseq graph, the Hugo files, and the deployment tooling to public GitHub.&lt;/p&gt;
&lt;p&gt;This way, others can clone my graph, see exactly how I’m using Logseq, and copy my deployment tooling to make a site like mine.&lt;/p&gt;
&lt;p&gt;I’m also using the Hugo PaperMod theme, which is open source and free to use.&lt;/p&gt;
&lt;h3&gt;How it Works&lt;/h3&gt;
&lt;h4&gt;Logseq&lt;/h4&gt;
&lt;p&gt;Logseq is a note taking app that lets you write in markdown and organize your notes in a graph. This is the core of my site.&lt;/p&gt;
&lt;p&gt;I do all my writing, note taking, and task management in Logseq so being able to instantly publish my notes is a huge advantage. My main goal is making it as frictionless as possible to post new notes to my site. Taking notes in Logseq, and re-editing in Markdown for my earlier static site was far too time-consuming.&lt;/p&gt;
&lt;h4&gt;Logseq Schrodinger (Hugo) Plugin&lt;/h4&gt;
&lt;p&gt;It is published using the Logseq Schrodinger Plugin which is now built into Logseq. This plugin takes my Logseq notes and converts them into Hugo-compatible markdown files.&lt;/p&gt;
&lt;p&gt;Hugo is mainly configured by “front matter” which is YAML at the top of your markdown files, to set things like the title, tags, description, permalink, etc.&lt;/p&gt;
&lt;h4&gt;Hugo&lt;/h4&gt;
&lt;p&gt;Hugo is a static site generator that takes markdown files and converts them to HTML. It is very fast and easy to use.&lt;/p&gt;
&lt;h5&gt;Papermod plugin&lt;/h5&gt;
&lt;p&gt;I’m using the Papermod theme, which is a very popular Hugo theme. It is free to use and open source.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&quot;https://github.com/adityatelange/hugo-PaperMod&quot;&gt;Papermod Plugin&lt;/a&gt; has many features like image optimization, google analytics, and social sharing. It includes the main features I need out of the box&lt;/p&gt;
&lt;p&gt;I will admit I prefer to use Javascript instead of Go for customization, but the speed and size of the community make Hugo worth it.&lt;/p&gt;
&lt;h4&gt;Deployment&lt;/h4&gt;
&lt;h5&gt;Logseq Schrodinger Plugin&lt;/h5&gt;
&lt;p&gt;After I’m writing a post in Logseq, I push the export button to generate a folder of Hugo-compatible markdown files.&lt;/p&gt;
&lt;p&gt;I check these files into git along with my public graph.&lt;/p&gt;
&lt;p&gt;I also push the Logseq graph to GitHub so others can see my notes and clone my graph.&lt;/p&gt;
&lt;h5&gt;Github Actions&lt;/h5&gt;
&lt;p&gt;Whenever I push to GitHub, Github Actions automatically generates my Hugo site and deploys it to AWS.&lt;/p&gt;
&lt;p&gt;I’m using the Hugo and AWS action to deploy my site to AWS S3 and CloudFront.&lt;/p&gt;
&lt;h5&gt;AWS CDK&lt;/h5&gt;
&lt;p&gt;I use the &lt;a href=&quot;https://aws.amazon.com/cdk/&quot;&gt;Typescript AWS CDK&lt;/a&gt; to configure the infrastructure for my site.&lt;/p&gt;
&lt;p&gt;It allows me to use Typescript to specify the entire AWS setup for my site including&lt;/p&gt;
&lt;p&gt;Route53 domain name&lt;/p&gt;
&lt;p&gt;subdomain&lt;/p&gt;
&lt;p&gt;s3&lt;/p&gt;
&lt;p&gt;CloudFront&lt;/p&gt;
&lt;p&gt;CloudFront function URL rewrite&lt;/p&gt;
&lt;p&gt;deployments and cache invalidations&lt;/p&gt;
&lt;h5&gt;CloudFront&lt;/h5&gt;
&lt;p&gt;CloudFront is a CDN that serves my content from locations all over the world, so it is fast everywhere, even in Australia.&lt;/p&gt;
&lt;p&gt;They have a generous free tier, so it doesn’t cost anything unless you have massive traffic.&lt;/p&gt;
&lt;h5&gt;CloudFront URL Rewrite&lt;/h5&gt;
&lt;p&gt;It’s really important to me to have “clean” links and I hate having a &lt;code&gt;/&lt;/code&gt; at the end of my sites like &lt;code&gt;briansunter.com/foo/&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;A CloudFront static site on S3 has these trailing slashes by default.&lt;/p&gt;
&lt;p&gt;I use a CloudFront function to rewrite the URL so the trailing slash isn’t needed&lt;/p&gt;
&lt;p&gt;If you try to add a trailing slash, the function redirects you to the non-trailing slash version.&lt;/p&gt;
&lt;p&gt;It’s a small detail, but I hate when hosting providers force me to use the trailing slash, so I’m happy to use CloudFront functions to remove it.&lt;/p&gt;
&lt;h3&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;I’m continuing to build out posts on my new site while migrating my old posts.&lt;/p&gt;
&lt;p&gt;I hope to fully move over to this site soon, and post a lot more often.&lt;/p&gt;
&lt;p&gt;So far, I’ve been really happy with this setup and hope to build it out more in the future.&lt;/p&gt;
&lt;p&gt;This is the first post I’ve written in Logseq and exported to Hugo, so I’m excited to see how it looks.&lt;/p&gt;
&lt;p&gt;I hope this post is helpful to others who are looking to build a static site with Logseq and Hugo.&lt;/p&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator><category>blog</category></item><item><title>You and Your Research</title><link>https://briansunter.com/you-and-your-research</link><guid isPermaLink="true">https://briansunter.com/you-and-your-research</guid><description>Richard Hamming&apos;s advice on doing significant work and why most scientists are forgotten.</description><pubDate>Wed, 17 Aug 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/image_1660798082719_0.K5XpzMQS_Z7QeUz.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;“Why do so few scientists make significant contributions and so many are forgotten in the long run?”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;“What is the biggest problem in your field? And why are you not working on it?”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Richard Hamming&lt;/h3&gt;
&lt;p&gt;Richard Hamming was a mathematician and computer scientist who worked on calculating machines for the Manhattan Project and for Bell Labs.&lt;/p&gt;
&lt;p&gt;He worked alongside some of the greatest scientists in history including Von Neumann, Feynman, Fermi, and more.&lt;/p&gt;
&lt;p&gt;In his talk &lt;a href=&quot;https://www.cs.virginia.edu/~robins/YouAndYourResearch.html&quot;&gt;You and Your Research (1986)&lt;/a&gt; he reflects on why some scientists he worked with like Claude Shannon went on to do Nobel Prize level work and others in the cubicles right next to them were forgotten.&lt;/p&gt;
&lt;h3&gt;What does it take to do Nobel Prize level work?&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;I’m not talking about ordinary run-of-the-mill research; I’m talking about great research. And for the sake of describing great research I’ll occasionally say Nobel-Prize type of work.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;I became very interested in the difference between those who do and those who might have done.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Here are some of his tips for doing Nobel Prize level work:&lt;/p&gt;
&lt;h3&gt;Stop being modest and decide to do great work&lt;/h3&gt;
&lt;p&gt;Great work is never done by accident. You need to have the confidence and courage to make it happen.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Drop modesty and say to yourself, “Yes, I would like to do first-class work.”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Our society frowns on people who set out to do really good work. You’re not supposed to; luck is supposed to descend on you and you do great things by chance. Well, that’s a kind of dumb thing to say. Luck will not cover everything.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;One of the characteristics of successful scientists is having courage. Once you get your courage up and believe that you can do important problems, then you can. If you think you can’t, almost surely you are not going to.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Choose to work on important problems&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;If you do not work on an important problem, it’s unlikely you’ll do important work. It’s perfectly obvious.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Great scientists have thought through, in a careful way, a number of important problems in their field, and they keep an eye on wondering how to attack&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Richard Hamming liked discussing problems with scientists from other fields.&lt;/p&gt;
&lt;p&gt;During lunch, he would sit with scientists from different fields and ask them questions about their work.&lt;/p&gt;
&lt;p&gt;One of his famous questions is: “What are the biggest problems in your field and why are you not working on them?”&lt;/p&gt;
&lt;p&gt;Many of his fellow scientists, when pressed, admitted they didn’t really believe the problems they were working on were important.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I started asking, “What are the important problems of your field?” And after a week or so, “What important problems are you working on?” And after some more time I came in one day and said, “If what you are doing is not important, and if you don’t think it is going to lead to something important, why are you at Bell Labs working on it?” I wasn’t welcomed after that; I had to find somebody else to eat with!&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;“Hamming, that remark of yours got underneath my skin. I thought about it all summer, i.e. what were the important problems in my field. I haven’t changed my research,” he says, “but I think it was well worthwhile.”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;I noticed a couple of months later he was made the head of the department. I noticed the other day he was a Member of the National Academy of Engineering. I noticed he has succeeded. I have never heard the names of any of the other fellows at that table mentioned in science and scientific circles. They were unable to ask themselves, “What are the important problems in my field?”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;The obstacle is the way&lt;/h3&gt;
&lt;p&gt;Don’t shy away from obstacles.&lt;/p&gt;
&lt;p&gt;Obstacles in the path of your short term goal are often the tip of the iceberg of truly great problems.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Early on it became evident to me that Bell Laboratories was not going to give me the conventional acre of programming people to program computing machines in absolute binary. It was clear they weren’t going to. But that was the way everybody did it. I could go to the West Coast and get a job with the airplane companies without any trouble, but the exciting people were at Bell Labs and the fellows out there in the airplane companies were not. I thought for a long while about, “Did I want to go or not?”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;I wondered how I could get the best of two possible worlds. I finally said to myself, “Hamming, you think the machines can do practically everything. Why can’t you make them write programs?” What appeared at first to me as a defect forced me into automatic programming very early.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;What appears to be a fault, often, by a change of viewpoint, turns out to be one of the greatest assets you can have. But you are not likely to think that when you first look the thing and say, “Gee, I’m never going to get enough programmers, so how can I ever do any great programming?‘&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Have tremendous drive&lt;/h3&gt;
&lt;p&gt;Hamming is a big believer in deliberate effort. He believes you need to both work hard and apply your effort sensibly.&lt;/p&gt;
&lt;p&gt;He also doesn’t shy away from the fact that you need to make sacrifices to do Nobel Prize level work. He admits it didn’t help his relationship with his wife.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;You observe that most great scientists have tremendous drive.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;I discovered that John Tukey was slightly younger than I was. John was a genius and I clearly was not. Well I went storming into Bode’s office and said, “How can anybody my age know as much as John Tukey does?” He leaned back in his chair, put his hands behind his head, grinned slightly, and said, “You would be surprised Hamming, how much you would know if you worked as hard as he did that many years.” I simply slunk out of the office!&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Given two people with exactly the same ability, the one person who manages day in and day out to get in one more hour of thinking will be tremendously more productive over a lifetime.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;“Knowledge and productivity are like compound interest.” Given two people of approximately the same ability and one person who works ten percent more than the other, the latter will more than twice outproduce the former. The more you know, the more you learn; the more you learn, the more you can do; the more you can do, the more the opportunity - it is very much like compound interest.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;I don’t like to say it in front of my wife, but I did sort of neglect her sometimes; I needed to study. You have to neglect things if you intend to get what you want done. There’s no question about this.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Drive, misapplied, doesn’t get you anywhere. I’ve often wondered why so many of my good friends at Bell Labs who worked as hard or harder than I did, didn’t have so much to show for it. The misapplication of effort is a very serious matter. Just hard work is not enough - it must be applied sensibly.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Tolerate ambiguitity&lt;/h3&gt;
&lt;p&gt;Great scientists have the confidence to put forth a theory and the humility to notice the flaws in the theory.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Most people like to believe something is or is not true. Great scientists tolerate ambiguity very well.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;They believe the theory enough to go ahead; they doubt it enough to notice the errors and faults so they can step forward and create the new replacement theory.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;If you believe too much you’ll never notice the flaws; if you doubt too much you won’t get started. It requires a lovely balance.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Darwin writes in his autobiography that he found it necessary to write down every piece of evidence which appeared to contradict his beliefs because otherwise they would disappear from his mind.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;When you find apparent flaws you’ve got to be sensitive and keep track of those things, and keep an eye out for how they can be explained or how the theory can be changed to fit them.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;I appreciate his unique insight from working with the greatest scientists in history, and what makes them different. I think there’s a lot of good advice in this talk about what it takes to become a great scientist.&lt;/p&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Newsletter Issue 7</title><link>https://briansunter.com/newsletter/issue-7</link><guid isPermaLink="true">https://briansunter.com/newsletter/issue-7</guid><description>Launching my new Logseq-powered website, algorithm analysis techniques, the five-minute journal practice, Richard Hamming&apos;s advice on doing important research, and the release of Stable Diffusion AI image generation.</description><pubDate>Wed, 10 Aug 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/FYqjtUnX0AAsVJEE_1672133776857_0.Dbh_x8UC_ZzpxAx.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;p&gt;Mark Zuckerberg as the girl with the pearl earring generated using Stable Diffusion&lt;/p&gt;

&lt;h2&gt;Summary and Reflection 🤔&lt;/h2&gt;
&lt;p&gt;This week I wrote a post announcing my new-website-on-logseq-hugo|new personal website.&lt;/p&gt;
&lt;p&gt;I also wrote a post on posteriori-vs-a-priori-analysis-of-algorithms|analysis of algorithms for the algorithms-boot-camp.&lt;/p&gt;
&lt;p&gt;This post focuses on the different ways of measuring algorithms theoretically and on actual hardware.&lt;/p&gt;
&lt;p&gt;For some “brain food,” I share one of my favorite talks, “You and your Research” by Richard Hamming, and an announcement of a new Open Source image generation AI called “Stable Diffusion.”&lt;/p&gt;
&lt;h2&gt;Updates 🆕&lt;/h2&gt;
&lt;h4&gt;&lt;a href=&quot;https://briansunter.com/new-website-on-logseq-hugo&quot;&gt;new-website-on-logseq-hugo&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;I launched a “beta” version of my website that’s built almost entirely in Logseq using the &lt;a href=&quot;https://github.com/sawhney17/logseq-schrodinger?utm_campaign=newsletter-email&amp;amp;utm_medium=email&amp;amp;utm_source=Revue%20newsletter&quot;&gt;Hugo Plugin&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I write all my posts in Logseq and then push a button to export them to files compatible with the &lt;a href=&quot;https://gohugo.io/?utm_campaign=newsletter-email&amp;amp;utm_medium=email&amp;amp;utm_source=Revue%20newsletter&quot;&gt;Hugo static site generator&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I’m still migrating my old pages and customizing them, but I’m pleased with the results.&lt;/p&gt;
&lt;p&gt;new-website-on-logseq-hugo|Read my post on it here.&lt;/p&gt;
&lt;p&gt;The site,logseq graph, and AWS CDK deployment tooling&lt;a href=&quot;https://github.com/briansunter/graph?utm_campaign=newsletter-email&amp;amp;utm_medium=email&amp;amp;utm_source=Revue%20newsletter&quot;&gt; is on Github.&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;&lt;a href=&quot;https://briansunter.com/algorithms&quot;&gt;algorithms&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;I’m studying algorithms and data structures.&lt;/p&gt;
&lt;p&gt;time-complexity|See my notes on time complexity here&lt;/p&gt;
&lt;p&gt;posteriori-vs-a-priori-analysis-of-algorithms|I wrote a post on posterior vs a priori analysis of algorithms&lt;/p&gt;
&lt;p&gt;As I watch various courses, I’ll algorithms-boot-camp|link to the concepts on the algorithms boot camp page as a learning roadmap&lt;/p&gt;
&lt;h2&gt;Productivity Toolkit 🛠️&lt;/h2&gt;
&lt;p&gt;In this section, I’ll share a productivity tip I’ve learned recently.&lt;/p&gt;
&lt;h4&gt;&lt;a href=&quot;https://briansunter.com/five-minute-journal&quot;&gt;five-minute-journal&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;The five-minute journal is one of the best places to start with journaling and productivity.&lt;/p&gt;
&lt;p&gt;The idea is you spend five minutes journaling every morning.&lt;/p&gt;
&lt;p&gt;Here are the prompts I use:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What Am I Grateful for?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;What Would Make Today Great?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;What Am I Worried About?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;five-minute-journal|Read my post about it here&lt;/p&gt;
&lt;h2&gt;Brain Food 🧠&lt;/h2&gt;
&lt;p&gt;In this section, I’ll share some interesting articles and “food for thought”&lt;/p&gt;
&lt;h3&gt;Quote&lt;/h3&gt;
&lt;h4&gt;&lt;a href=&quot;https://briansunter.com/you-and-your-research&quot;&gt;you-and-your-research&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://briansunter.com/you-and-your-research?utm_campaign=newsletter-email&amp;amp;utm_medium=email&amp;amp;utm_source=Revue%20newsletter&quot;&gt;My notes on this talk from 1986&lt;/a&gt; about what it takes to do Nobel prize-level work.&lt;/p&gt;
&lt;p&gt;Richard Hamming was a mathematician and computer scientist who worked on calculating machines for the Manhattan Project and Bell Labs.&lt;/p&gt;
&lt;p&gt;He worked alongside some of the most outstanding scientists in history, including Von Neumann, Feynman, Fermi, and more.&lt;/p&gt;
&lt;p&gt;In his talk, &lt;a href=&quot;https://www.cs.virginia.edu/~robins/YouAndYourResearch.html&quot;&gt;You and Your Research (1986)&lt;/a&gt;, he reflects on why some scientists he worked with, like Claude Shannon, went on to do Nobel Prize-level work, and others in the cubicles right next to them were forgotten.&lt;/p&gt;
&lt;p&gt;My favorite piece of advice is his urge to focus on important problems above all else and be honest with yourself if what you’re working on is worthwhile.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;If you do not work on an important problem, it’s unlikely you’ll do important work. It’s perfectly obvious.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;He has a story where he would eat lunch with other scientists from different fields at Bell Labs:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I started asking, “What are the important problems of your field?“ And after a week or so, “What important problems are you working on?” And after some more time I came in one day and said, “If what you are doing is not important, and if you don’t think it is going to lead to something important, why are you at Bell Labs working on it?“ I wasn’t welcomed after that; I had to find somebody else to eat with!&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;When pressed, many of his fellow scientists admitted they didn’t believe the problems they were working on were significant.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Great scientists have thought through, in a careful way, a number of important problems in their field, and they keep an eye on wondering how to attack&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I highly recommend reading &lt;a href=&quot;https://www.cs.virginia.edu/~robins/YouAndYourResearch.html&quot;&gt;his full talk&lt;/a&gt; if you consider yourself a scientist or researcher.&lt;/p&gt;
&lt;p&gt;you-and-your-research|See my notes here&lt;/p&gt;
&lt;h3&gt;Link of the week - Stable Diffusion&lt;/h3&gt;
&lt;p&gt;AI image generation is advancing incredibly rapidly. You describe the image you want to AI programs, and they will generate an original idea.&lt;/p&gt;
&lt;p&gt;The public is just beginning to see this technology, and its effects will be huge. You won’t be able to believe anything you see soon. And you’ll be seeing shocking stuff, I’m sure.&lt;/p&gt;
&lt;p&gt;The AI art generation is getting so good that it will replace a lot of concept art, game art, and movie art.&lt;/p&gt;
&lt;p&gt;There is a lot of controversy around having something that can automate the work of human artists, especially since the AI was trained on the work of professional artists.&lt;/p&gt;

  &lt;div class=&quot;not-prose tweet-embed&quot;&gt;
    &lt;div class=&quot;tweet-card&quot;&gt;
      &lt;a href=&quot;https://twitter.com/EMostaque/status/1552233024259063811&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;&lt;/a&gt;
      &lt;div class=&quot;tweet-header&quot;&gt;
        &lt;div class=&quot;tweet-author&quot;&gt;
          &lt;img src=&quot;https://pbs.twimg.com/profile_images/1774915113922809856/6RXK1Yy0_normal.png&quot; alt=&quot;Emad&apos;s avatar&quot; /&gt;
          &lt;div class=&quot;tweet-author-info&quot;&gt;
            &lt;a href=&quot;https://twitter.com/EMostaque/status/1552233024259063811&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
              &lt;div class=&quot;tweet-author-name-row&quot;&gt;
                &lt;span class=&quot;tweet-author-name&quot;&gt;Emad&lt;/span&gt;
                

  


              &lt;/div&gt;
            &lt;/a&gt;
            &lt;span class=&quot;tweet-author-handle&quot;&gt;@EMostaque&lt;/span&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;a href=&quot;https://twitter.com/EMostaque/status/1552233024259063811&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;

  
    
  

&lt;/a&gt;
      &lt;/div&gt;
      
      &lt;div class=&quot;tweet-body&quot;&gt;“Boy with the …”.
&lt;a href=&quot;https://twitter.com/hashtag/StableDiffusion&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;#StableDiffusion&lt;/a&gt; &lt;a href=&quot;https://twitter.com/hashtag/AIart&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;#AIart&lt;/a&gt;

Oh brave new world with such creations in it.

&lt;a href=&quot;https://twitter.com/hashtag/sorrynotsorry&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;#sorrynotsorry&lt;/a&gt; https://t.co/gpLQUJkp1T&lt;/div&gt;
      
      
    &lt;div class=&quot;tweet-media&quot;&gt;
      &lt;img src=&quot;https://pbs.twimg.com/media/FYqjtUnX0AAsVJE.jpg&quot; alt=&quot;Tweet media&quot; loading=&quot;lazy&quot; /&gt;
    &lt;/div&gt;
      &lt;a href=&quot;https://twitter.com/EMostaque/status/1552233024259063811&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
        &lt;span class=&quot;tweet-timestamp&quot;&gt;Jul 27, 2022, 10:02 AM&lt;/span&gt;
      &lt;/a&gt;
      &lt;hr /&gt;
      &lt;div class=&quot;tweet-actions&quot;&gt;
        &lt;div class=&quot;tweet-action tweet-action-like&quot;&gt;
          

  
    
  


          &lt;span&gt;375&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class=&quot;tweet-action tweet-action-reply&quot;&gt;
          

  
    
  


          &lt;span&gt;14&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  
&lt;p&gt;I was very impressed when I first saw DALL-E, but I was disappointed too.&lt;/p&gt;
&lt;p&gt;It was unique but censored, pay-per-use, not open source, impossible to run locally or modify, etc.&lt;/p&gt;
&lt;p&gt;Stability AI is releasing an open-source AI image generation program called “Stable Diffusion” that can run on midrange PCs and M1 Macs.&lt;/p&gt;
&lt;p&gt;Stable Diffusion will be massive because people can now run powerful AI image generation on their hardware and do whatever they want. We will see a lot of new tools for artists built around this.&lt;/p&gt;
&lt;p&gt;I’m sure we’ll see a lot of crazy stuff with this soon, but I can’t wait for the creative potential this unlocks.&lt;/p&gt;

  &lt;div class=&quot;not-prose tweet-embed&quot;&gt;
    &lt;div class=&quot;tweet-card&quot;&gt;
      &lt;a href=&quot;https://twitter.com/EMostaque/status/1561777122082824192&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;&lt;/a&gt;
      &lt;div class=&quot;tweet-header&quot;&gt;
        &lt;div class=&quot;tweet-author&quot;&gt;
          &lt;img src=&quot;https://pbs.twimg.com/profile_images/1774915113922809856/6RXK1Yy0_normal.png&quot; alt=&quot;Emad&apos;s avatar&quot; /&gt;
          &lt;div class=&quot;tweet-author-info&quot;&gt;
            &lt;a href=&quot;https://twitter.com/EMostaque/status/1561777122082824192&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
              &lt;div class=&quot;tweet-author-name-row&quot;&gt;
                &lt;span class=&quot;tweet-author-name&quot;&gt;Emad&lt;/span&gt;
                

  


              &lt;/div&gt;
            &lt;/a&gt;
            &lt;span class=&quot;tweet-author-handle&quot;&gt;@EMostaque&lt;/span&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;a href=&quot;https://twitter.com/EMostaque/status/1561777122082824192&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;

  
    
  

&lt;/a&gt;
      &lt;/div&gt;
      
      &lt;div class=&quot;tweet-body&quot;&gt;Delighted to announce the public open source release of &lt;a href=&quot;https://twitter.com/hashtag/StableDiffusion&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;#StableDiffusion&lt;/a&gt;!

Please see our release post and retweet! &lt;a href=&quot;https://www.stability.ai/blog/stable-diffusion-public-release&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;stability.ai/blog/stable-di…&lt;/a&gt;

Proud of everyone involved in releasing this tech that is the first of a series of models to activate the creative potential of humanity&lt;/div&gt;
      
      
      &lt;a href=&quot;https://twitter.com/EMostaque/status/1561777122082824192&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
        &lt;span class=&quot;tweet-timestamp&quot;&gt;Aug 22, 2022, 6:07 PM&lt;/span&gt;
      &lt;/a&gt;
      &lt;hr /&gt;
      &lt;div class=&quot;tweet-actions&quot;&gt;
        &lt;div class=&quot;tweet-action tweet-action-like&quot;&gt;
          

  
    
  


          &lt;span&gt;5.3K&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class=&quot;tweet-action tweet-action-reply&quot;&gt;
          

  
    
  


          &lt;span&gt;107&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  
&lt;h2&gt;Outro&lt;/h2&gt;
&lt;p&gt;Check out the &lt;a href=&quot;https://briansunter.com/newsletter-roadmap&quot;&gt;newsletter-roadmap&lt;/a&gt; to see what I have in mind for future issues. Let me know on &lt;a href=&quot;https://twitter.com&quot;&gt;twitter @bsunter&lt;/a&gt;&lt;/p&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Machine Learning Study Guide</title><link>https://briansunter.com/machine-learning-study-guide</link><guid isPermaLink="true">https://briansunter.com/machine-learning-study-guide</guid><description>An outline of topics to study for understanding machine learning fundamentals.</description><pubDate>Sun, 17 Jul 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;A structured outline for learning machine learning, from mathematical foundations to practical implementation.&lt;/p&gt;
&lt;h2&gt;Mathematics&lt;/h2&gt;
&lt;h3&gt;Linear algebra&lt;/h3&gt;
&lt;p&gt;Core concepts for understanding how ML algorithms manipulate data.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Vector spaces&lt;/li&gt;
&lt;li&gt;Linear transformations&lt;/li&gt;
&lt;li&gt;Matrices and determinants&lt;/li&gt;
&lt;li&gt;Eigenvectors and eigenvalues&lt;/li&gt;
&lt;li&gt;Systems of linear equations&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Vector operations:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Addition, subtraction, scalar multiplication&lt;/li&gt;
&lt;li&gt;Dot product and cross product&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Advanced topics:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Linear independence and span&lt;/li&gt;
&lt;li&gt;Orthogonality and projections&lt;/li&gt;
&lt;li&gt;Eigendecomposition&lt;/li&gt;
&lt;li&gt;Singular value decomposition (SVD)&lt;/li&gt;
&lt;li&gt;Principal component analysis (PCA)&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Calculus&lt;/h3&gt;
&lt;p&gt;Essential for understanding optimization and how models learn.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Limits and continuity&lt;/li&gt;
&lt;li&gt;Derivatives and integrals&lt;/li&gt;
&lt;li&gt;Partial derivatives&lt;/li&gt;
&lt;li&gt;Gradient descent&lt;/li&gt;
&lt;li&gt;Vector fields&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Optimization methods:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Convex optimization&lt;/li&gt;
&lt;li&gt;Newton’s method&lt;/li&gt;
&lt;li&gt;Conjugate gradient&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Probability and statistics&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Fundamentals:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Random variables and events&lt;/li&gt;
&lt;li&gt;Probability density functions&lt;/li&gt;
&lt;li&gt;Distributions (normal, binomial, Poisson)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;em&gt;Recommended: “Introduction to Probability” by Blitzstein and Hwang&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Advanced topics:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Markov chains&lt;/li&gt;
&lt;li&gt;Hidden Markov models&lt;/li&gt;
&lt;li&gt;Bayesian inference&lt;/li&gt;
&lt;li&gt;Estimation and hypothesis testing&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;em&gt;Recommended: “The Elements of Statistical Learning” by Hastie, Tibshirani, and Friedman&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Regularization:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;L1 regularization (Lasso)&lt;/li&gt;
&lt;li&gt;L2 regularization (Ridge)&lt;/li&gt;
&lt;li&gt;Sparsity&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Computer science foundations&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Algorithms and complexity&lt;/li&gt;
&lt;li&gt;Data structures&lt;/li&gt;
&lt;li&gt;Software engineering practices&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Machine learning&lt;/h2&gt;
&lt;h3&gt;Supervised learning&lt;/h3&gt;
&lt;p&gt;Learning from labeled data.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Linear regression&lt;/li&gt;
&lt;li&gt;Logistic regression&lt;/li&gt;
&lt;li&gt;Support vector machines (SVM)&lt;/li&gt;
&lt;li&gt;Decision trees and random forests&lt;/li&gt;
&lt;li&gt;Neural networks&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Unsupervised learning&lt;/h3&gt;
&lt;p&gt;Finding patterns in unlabeled data.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Clustering (k-means, hierarchical)&lt;/li&gt;
&lt;li&gt;Dimensionality reduction&lt;/li&gt;
&lt;li&gt;Feature selection&lt;/li&gt;
&lt;li&gt;Anomaly detection&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Deep learning&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Artificial neural networks (ANN)&lt;/li&gt;
&lt;li&gt;Convolutional neural networks (CNN)&lt;/li&gt;
&lt;li&gt;Recurrent neural networks (RNN)&lt;/li&gt;
&lt;li&gt;Long short-term memory (LSTM)&lt;/li&gt;
&lt;li&gt;Autoencoders&lt;/li&gt;
&lt;li&gt;Transformers&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Ensemble methods&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Bagging and boosting&lt;/li&gt;
&lt;li&gt;Random forests&lt;/li&gt;
&lt;li&gt;Gradient boosting (XGBoost, LightGBM)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Data pipeline&lt;/h2&gt;
&lt;h3&gt;Preprocessing&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Data cleaning&lt;/li&gt;
&lt;li&gt;Handling missing values&lt;/li&gt;
&lt;li&gt;Normalization and scaling&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Feature engineering&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Feature extraction&lt;/li&gt;
&lt;li&gt;Feature selection&lt;/li&gt;
&lt;li&gt;Dimensionality reduction&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Model evaluation&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Train/test splits&lt;/li&gt;
&lt;li&gt;Cross-validation&lt;/li&gt;
&lt;li&gt;Metrics (accuracy, precision, recall, F1, AUC)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Tools and libraries&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Python&lt;/strong&gt;: Primary language for ML&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;NumPy/Pandas&lt;/strong&gt;: Data manipulation&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;scikit-learn&lt;/strong&gt;: Traditional ML algorithms&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;TensorFlow/PyTorch&lt;/strong&gt;: Deep learning frameworks&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Keras&lt;/strong&gt;: High-level neural network API&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Next steps&lt;/h2&gt;
&lt;p&gt;See my ai-learning-resources|AI learning resources for courses, books, and tutorials on these topics.&lt;/p&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Newsletter Issue 6</title><link>https://briansunter.com/newsletter/issue-6</link><guid isPermaLink="true">https://briansunter.com/newsletter/issue-6</guid><description>I wrote a simple introduction to algorithms and why they&apos;re important and a short guide to my current logseq-projects template.</description><pubDate>Sun, 17 Jul 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/image_1657735112414_0_1672132400967_0.D2jDs73c_2fu7E2.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Summary and Reflection 🤔&lt;/h2&gt;
&lt;p&gt;This week I wrote the first section &lt;a href=&quot;https://briansunter.com/intro-to-algorithms&quot;&gt;intro-to-algorithms&lt;/a&gt; from the &lt;a href=&quot;https://briansunter.com/algorithms-boot-camp&quot;&gt;algorithms-boot-camp&lt;/a&gt; which focuses on a simple introduction to what algorithms are and why they’re important&lt;/p&gt;
&lt;p&gt;For some “brain food” I share some thoughts from my all time favorite tech talk and an interesting paper on AI playing Stratego.&lt;/p&gt;
&lt;h2&gt;Updates 🆕&lt;/h2&gt;
&lt;h3&gt;&lt;a href=&quot;https://briansunter.com/intro-to-algorithms&quot;&gt;intro-to-algorithms&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The first section in the bootcamp focuses on introducing what an algorithm is.&lt;/p&gt;
&lt;p&gt;This guide is really basic, but I think it’s helpful to start with a really high level introduction.&lt;/p&gt;
&lt;p&gt;In computer science, an algorithm is a series of steps written in code that a computer runs to perform a task.&lt;/p&gt;
&lt;p&gt;I go through some examples of algorithms, what they can do, and why they’re useful.&lt;/p&gt;
&lt;h2&gt;Productivity Toolkit 🛠️&lt;/h2&gt;
&lt;p&gt;In this section, I’ll share a productivity tip I’ve learned recently.&lt;/p&gt;
&lt;h3&gt;&lt;a href=&quot;https://briansunter.com/logseq-projects&quot;&gt;logseq-projects&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;I manage almost everything I do with &lt;a href=&quot;https://briansunter.com/logseq-projects&quot;&gt;logseq-projects&lt;/a&gt; . I use them to group tasks across different initiatives, prioritize them, and make progress on them. See this guide for an explanation or jump straight to my &lt;a href=&quot;https://briansunter.com/logseq-projects&quot;&gt;logseq-projects&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Brain Food 🧠&lt;/h2&gt;
&lt;p&gt;In this section, I’ll share some interesting articles and “food for thought”&lt;/p&gt;
&lt;h3&gt;Quote&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;Simplicity is a prerequisite for reliability.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Edsger W. Dijkstra&lt;/p&gt;
&lt;p&gt;One of my favorite tech talks of all time is &lt;a href=&quot;https://github.com/matthiasn/talk-transcripts/blob/master/Hickey_Rich/SimpleMadeEasy.md&quot;&gt;“Simple Made Easy” by Rich Hickey”&lt;/a&gt;. It’s mostly a philosophical talk, it doesn’t have much code in it.&lt;/p&gt;
&lt;iframe width=&quot;100%&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/SxdOUGdseq4&quot; frameborder=&quot;0&quot; loading=&quot;lazy&quot; allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen&gt;&lt;/iframe&gt;
&lt;p&gt;This talk is about the difference between simple and easy, in the context of designing complex systems like computer software.&lt;/p&gt;
&lt;p&gt;Many programmers are obsessed with making things “easy” for themselves but we should be much more concerned with making things “simple” so they are reliable and easy to maintain.&lt;/p&gt;
&lt;p&gt;Tools focused on programmer convenience may do things you don’t fully understand.&lt;/p&gt;
&lt;h4&gt;Simple vs Complex&lt;/h4&gt;
&lt;p&gt;Programmers use the word simple and easy interchangeably. However, they’re two different yet related concepts.&lt;/p&gt;
&lt;p&gt;Examining the root word of “simple” and “complex” sheds some light on the difference between “simple” and “easy.”&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;image 1657735112414 0&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 299px) 299px, 100vw&quot; width=&quot;299&quot; height=&quot;494&quot; src=&quot;https://briansunter.com/_astro/image_1657735112414_0_1672132400967_0.D2jDs73c_1m00e4.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1657735112414_0_1672132400967_0.D2jDs73c_1m00e4.webp 299w&quot; /&gt;&lt;figcaption&gt;image 1657735112414 0&lt;/figcaption&gt;&lt;/figure&gt;
&lt;blockquote&gt;
&lt;p&gt;So the first word is simple. And the roots of this word are sim and plex, and that means one fold or one braid or twist.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;And the opposite of this word is complex, which means braided together or folded together. Being able to think about our software in terms of whether or not it’s folded together is sort of the central point of this talk.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;We can look at something and see that it’s “simple”. We can’t do the same for “easy”.&lt;/p&gt;
&lt;h4&gt;Simple vs Easy&lt;/h4&gt;
&lt;p&gt;“Simple” is a concept we can objectively look at, whereas “easy” is much more relative to the individual.&lt;/p&gt;
&lt;p&gt;What’s easy for me may be hard for you and vice versa.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The critical thing to distinguish it from simple is that easy is relative. Right? Playing the violin and reading German are really hard for me. They’re easy for other people, certain other people. So unlike simple where we can go and look for interleavings, look for braiding, easy is always going to be, you know, easy for whom, or hard for whom? It’s a relative term.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;We throw these terms around sort of casually saying, oh, I like to use that technology because it’s simple, and when I’m saying simple, I mean easy. And when I am saying easy, I mean because I already know something that looks very much alike that. It’s how this whole thing degrades and we can never have an objective discussion about the qualities that matter to us in our software.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;If you want everything to be familiar, you will never learn anything new because it can’t be significantly different from what you already know&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h4&gt;Focus on the output of your process&lt;/h4&gt;
&lt;p&gt;We focus so much on our familiarity with tools and short-term convenience. Let’s focus more on the quality of the product we’re shipping and the sustainability of developing it.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;image 1657735246074 0&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 595px) 595px, 100vw&quot; width=&quot;595&quot; height=&quot;446&quot; src=&quot;https://briansunter.com/_astro/image_1657735246074_0_1672132643414_0.CAeboJ0v_qLBTM.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1657735246074_0_1672132643414_0.CAeboJ0v_qLBTM.webp 595w&quot; /&gt;&lt;figcaption&gt;image 1657735246074 0&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Modern tools and processes are so focused on making things fast and “easy” for those making the software, but these processes often produce “complex” results, which eventually becomes “hard” to maintain long term.&lt;/p&gt;
&lt;p&gt;Instead we need to focus on making things “simple” above all else.&lt;/p&gt;
&lt;p&gt;Simple may be harder, unfamiliar, and slower at first, but in the long run simplicity is the only sustainable way forward.&lt;/p&gt;
&lt;h3&gt;Link of the week&lt;/h3&gt;
&lt;h3&gt;AI Masters Stratego Board Game&lt;/h3&gt;
&lt;p&gt;AI can play Stratego at an expert level now&lt;/p&gt;
&lt;p&gt;Stratego is one of the few iconic board games that AI has not yet mastered.&lt;/p&gt;
&lt;p&gt;This popular game has an enormous game tree on the order of 10^535 nodes, i.e., 10^175 times larger than that of Go.&lt;/p&gt;
&lt;p&gt;I used to love this game growing up. I didn’t realize it was one of the hardest board games in the world.&lt;/p&gt;
&lt;p&gt;The reason it’s so difficult is because you can’t see your oppononents pieces. It has “imperfect information” like poker, so you have to infer what’s on the board.&lt;/p&gt;
&lt;p&gt;Knowing that it’s a mathematically interesting game renewed my interest a bit, and I’ve been playing it on mobile. It has a great “quick play” mode which randomizes the initial layout which makes it much faster to practice.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;image 1657604178916 0&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 800px) 800px, 100vw&quot; width=&quot;800&quot; height=&quot;620&quot; src=&quot;https://briansunter.com/_astro/image_1657604178916_0_1672132676533_0.CxWHK-9Q_ZpB1mW.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1657604178916_0_1672132676533_0.CxWHK-9Q_2dh6pz.webp 640w, https://briansunter.com/_astro/image_1657604178916_0_1672132676533_0.CxWHK-9Q_UdYhr.webp 750w, https://briansunter.com/_astro/image_1657604178916_0_1672132676533_0.CxWHK-9Q_ZpB1mW.webp 800w&quot; /&gt;&lt;figcaption&gt;image 1657604178916 0&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;a href=&quot;https://t.co/xXagujMfmw&quot;&gt;Read the paper here&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Analytics 📈&lt;/h2&gt;
&lt;p&gt;Still amazed at the res pins&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Screen Shot 2022-07-14 at 8.43.42 PM 1657856650764 0&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 435px) 435px, 100vw&quot; width=&quot;435&quot; height=&quot;308&quot; src=&quot;https://briansunter.com/_astro/Screen_Shot_2022-07-14_at_8.43.42_PM_1657856650764_0_1672132794501_0.Biqu-2s1_Z1ANK0V.webp&quot; srcset=&quot;https://briansunter.com/_astro/Screen_Shot_2022-07-14_at_8.43.42_PM_1657856650764_0_1672132794501_0.Biqu-2s1_Z1ANK0V.webp 435w&quot; /&gt;&lt;figcaption&gt;Screen Shot 2022-07-14 at 8.43.42 PM 1657856650764 0&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2&gt;Outro&lt;/h2&gt;
&lt;p&gt;Check out the &lt;a href=&quot;https://briansunter.com/newsletter-roadmap&quot;&gt;newsletter-roadmap&lt;/a&gt; to see what I have in mind for future issues. Let me know on &lt;a href=&quot;https://twitter.com&quot;&gt;twitter @bsunter&lt;/a&gt;&lt;/p&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>100 newsletter subscribers</title><link>https://briansunter.com/100-newsletter-subscribers</link><guid isPermaLink="true">https://briansunter.com/100-newsletter-subscribers</guid><description>Reaching 100 newsletter subscribers milestone</description><pubDate>Wed, 13 Jul 2022 00:00:00 GMT</pubDate><content:encoded>&lt;h3&gt;Summary&lt;/h3&gt;
&lt;p&gt;I am starting a newsletter about my learnings on coding, technology, health, and productivity.&lt;/p&gt;
&lt;p&gt;I’m going to post useful content from my logseq graph on twitter, where I will have a newsletter signup on my profile.&lt;/p&gt;
&lt;p&gt;My newsletter will mostly be curated tweets, which will be high quality links to my graph with screenshots.&lt;/p&gt;
&lt;p&gt;My website will be used for permanently storing the articles, my twitter will be used for promotion and commenting,&lt;/p&gt;
&lt;h3&gt;Related long term goals&lt;/h3&gt;
&lt;p&gt;write book&lt;/p&gt;
&lt;p&gt;100000 followers&lt;/p&gt;
&lt;p&gt;become financially independent&lt;/p&gt;
&lt;h3&gt;Desired output&lt;/h3&gt;
&lt;p&gt;Gain 100 &lt;a href=&quot;https://briansunter.com/newsletter&quot;&gt;newsletter&lt;/a&gt; followers in the next 3 months.&lt;/p&gt;
&lt;h3&gt;Tasks&lt;/h3&gt;
&lt;p&gt;set up newsletter on twitter&lt;/p&gt;
&lt;p&gt;research newsletter platforms&lt;/p&gt;
&lt;p&gt;pick newsletter platform&lt;/p&gt;
&lt;p&gt;revue&lt;/p&gt;
&lt;p&gt;reserach twitter newsletter&lt;/p&gt;
&lt;p&gt;Write first newsletter&lt;/p&gt;
&lt;p&gt;Announce newsletter&lt;/p&gt;
&lt;p&gt;ask for feedback on &lt;a href=&quot;https://briansunter.com/newsletter-roadmap&quot;&gt;newsletter-roadmap&lt;/a&gt;&lt;/p&gt;

  &lt;div class=&quot;not-prose tweet-embed&quot;&gt;
    &lt;div class=&quot;tweet-card&quot;&gt;
      &lt;a href=&quot;https://twitter.com/Bsunter/status/1536775128175915009&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;&lt;/a&gt;
      &lt;div class=&quot;tweet-header&quot;&gt;
        &lt;div class=&quot;tweet-author&quot;&gt;
          &lt;img src=&quot;https://pbs.twimg.com/profile_images/507230915458646016/POGcr0En_normal.jpeg&quot; alt=&quot;Brian Sunter&apos;s avatar&quot; /&gt;
          &lt;div class=&quot;tweet-author-info&quot;&gt;
            &lt;a href=&quot;https://twitter.com/Bsunter/status/1536775128175915009&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
              &lt;div class=&quot;tweet-author-name-row&quot;&gt;
                &lt;span class=&quot;tweet-author-name&quot;&gt;Brian Sunter&lt;/span&gt;
                

  


              &lt;/div&gt;
            &lt;/a&gt;
            &lt;span class=&quot;tweet-author-handle&quot;&gt;@Bsunter&lt;/span&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;a href=&quot;https://twitter.com/Bsunter/status/1536775128175915009&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;

  
    
  

&lt;/a&gt;
      &lt;/div&gt;
      
      &lt;div class=&quot;tweet-body&quot;&gt;Brainstorming some ideas for blog posts on my public graph. What type of content is your favorite? This will influence the roadmap&lt;/div&gt;
      
      
      &lt;a href=&quot;https://twitter.com/Bsunter/status/1536775128175915009&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
        &lt;span class=&quot;tweet-timestamp&quot;&gt;Jun 14, 2022, 6:18 PM&lt;/span&gt;
      &lt;/a&gt;
      &lt;hr /&gt;
      &lt;div class=&quot;tweet-actions&quot;&gt;
        &lt;div class=&quot;tweet-action tweet-action-like&quot;&gt;
          

  
    
  


          &lt;span&gt;0&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class=&quot;tweet-action tweet-action-reply&quot;&gt;
          

  
    
  


          &lt;span&gt;0&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  
&lt;p&gt;create initial &lt;a href=&quot;https://briansunter.com/newsletter-roadmap&quot;&gt;newsletter-roadmap&lt;/a&gt; for first 6 weeks&lt;/p&gt;
&lt;h3&gt;Templates&lt;/h3&gt;
&lt;p&gt;comparison template (archived)&lt;/p&gt;
&lt;p&gt;newsletter/template&lt;/p&gt;
&lt;h3&gt;Habits 100 newsletter subscribers&lt;/h3&gt;
&lt;p&gt;schedule note tweet
SCHEDULED: &amp;lt;2022-06-28 Tue .+1d&amp;gt;&lt;/p&gt;
&lt;p&gt;Quote tweet and link tweet
SCHEDULED: &amp;lt;2022-06-28 Tue .+1d&amp;gt;&lt;/p&gt;
&lt;p&gt;Comment and like - 5 mins
SCHEDULED: &amp;lt;2022-07-07 Thu .+1d&amp;gt;&lt;/p&gt;
&lt;p&gt;Clean up followers - 5 mins
SCHEDULED: &amp;lt;2022-06-28 Tue .+1d&amp;gt;&lt;/p&gt;
&lt;p&gt;update content in reveue.
SCHEDULED: &amp;lt;2022-07-06 Wed .+2d&amp;gt;&lt;/p&gt;
&lt;p&gt;newsletter research
SCHEDULED: &amp;lt;2022-06-29 Wed .+1w&amp;gt;&lt;/p&gt;
&lt;p&gt;update and tune &lt;a href=&quot;https://briansunter.com/newsletter-roadmap&quot;&gt;newsletter-roadmap&lt;/a&gt;
SCHEDULED: &amp;lt;2022-06-28 Tue .+1d&amp;gt;&lt;/p&gt;
&lt;p&gt;weekly review
SCHEDULED: &amp;lt;2022-06-29 Wed ++1w&amp;gt;&lt;/p&gt;
&lt;p&gt;analytics&lt;/p&gt;
&lt;p&gt;status&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://briansunter.com/newsletter-roadmap&quot;&gt;newsletter-roadmap&lt;/a&gt; research
SCHEDULED: &amp;lt;2022-06-30 Thu .+1d&amp;gt;&lt;/p&gt;
&lt;h3&gt;Notes&lt;/h3&gt;
&lt;h4&gt;Newsletter Hosting Providers Comparison&lt;/h4&gt;





























&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Option&lt;/th&gt;&lt;th&gt;Pros&lt;/th&gt;&lt;th&gt;Cons&lt;/th&gt;&lt;th&gt;Notes&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;a href=&quot;https://substack.com/&quot;&gt;Substack&lt;/a&gt;&lt;/td&gt;&lt;td&gt;- well known[:br]- better ux and writing interface&lt;/td&gt;&lt;td&gt;- take 10% earnings[:br]- $50 custom domain fee&lt;/td&gt;&lt;td&gt;fees too high&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;a href=&quot;https://web.archive.org/web/20220625001636/https://www.getrevue.co/&quot;&gt;Revue&lt;/a&gt;&lt;/td&gt;&lt;td&gt;- takes 5% earnings[:br]- twitter badge and integration[:br]- unlimited subscribers&lt;/td&gt;&lt;td&gt;- Interface not as nice as substack&lt;/td&gt;&lt;td&gt;Iffy UI, but free and integrates with twitter&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;a href=&quot;https://mailchimp.com&quot;&gt;Mailchimp&lt;/a&gt;&lt;/td&gt;&lt;td&gt;- powerful tooling and templates[:br]- customer support&lt;/td&gt;&lt;td&gt;Overkill for personal newsletter&lt;/td&gt;&lt;td&gt;better for startups&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Machine Learning Study Guide (GPT-3 Generated)</title><link>https://briansunter.com/machine-learning-study-guide-gpt</link><guid isPermaLink="true">https://briansunter.com/machine-learning-study-guide-gpt</guid><description>AI-generated explanations of machine learning concepts, used to build a structured study guide.</description><pubDate>Tue, 12 Jul 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;This page contains GPT-3 prompts and responses used to generate the machine-learning-study-guide|Machine Learning Study Guide.&lt;/p&gt;
&lt;hr /&gt;
&lt;h2&gt;Curriculum overview&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Prompt:&lt;/strong&gt; Write a curriculum for a programmer to study machine learning&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Response:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;A machine learning programmer should have a strong foundation in mathematics, statistics, and computer science. Here is a suggested curriculum:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Mathematics&lt;/strong&gt;: Linear algebra, calculus, probability and statistics&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Computer Science&lt;/strong&gt;: Algorithms, data structures, software engineering&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Machine Learning&lt;/strong&gt;: Supervised and unsupervised learning algorithms, predictive modeling, deep learning&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Data Mining&lt;/strong&gt;: Data pre-processing, feature selection, model evaluation&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Software Packages&lt;/strong&gt;: R, Python, SAS, MATLAB&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h2&gt;Mathematics&lt;/h2&gt;
&lt;h3&gt;Linear algebra&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Prompt:&lt;/strong&gt; Write a curriculum for a programmer to study linear algebra for machine learning&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Response:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Basic concepts:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Vector spaces&lt;/li&gt;
&lt;li&gt;Linear transformations&lt;/li&gt;
&lt;li&gt;Matrices&lt;/li&gt;
&lt;li&gt;Determinants&lt;/li&gt;
&lt;li&gt;Eigenvectors and eigenvalues&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Topics in linear algebra:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Solving systems of linear equations&lt;/li&gt;
&lt;li&gt;Vector operations (addition, subtraction, scalar multiplication, dot product, cross product)&lt;/li&gt;
&lt;li&gt;Linear independence and span&lt;/li&gt;
&lt;li&gt;Orthogonality&lt;/li&gt;
&lt;li&gt;Projections&lt;/li&gt;
&lt;li&gt;Eigendecomposition&lt;/li&gt;
&lt;li&gt;Singular value decomposition&lt;/li&gt;
&lt;li&gt;Principal component analysis&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Calculus&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Prompt:&lt;/strong&gt; Write a curriculum for a programmer to study calculus concepts most important for machine learning&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Response:&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Review basic calculus concepts including limits, derivatives, and integrals.&lt;/li&gt;
&lt;li&gt;Study multivariate calculus: partial derivatives, gradient descent, and vector fields.&lt;/li&gt;
&lt;li&gt;Study optimization methods: convex optimization, gradient descent, and Newton’s Method.&lt;/li&gt;
&lt;li&gt;Study differential equations: linear equations, first order equations, and higher order equations.&lt;/li&gt;
&lt;li&gt;Study probability and statistics: random variables, distributions, and hypothesis testing.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;Probability and statistics&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Prompt:&lt;/strong&gt; Write a curriculum for a programmer to study the most important probability concepts for machine learning&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Response:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Recommended resources:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;“Introduction to Probability” by Joseph K. Blitzstein and Jessica Hwang&lt;/li&gt;
&lt;li&gt;“The Elements of Statistical Learning” by Trevor Hastie, Robert Tibshirani, and Jerome Friedman&lt;/li&gt;
&lt;li&gt;Online courses from Coursera or Udacity&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Topics to cover:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Basic probability concepts (random variables, events, probability density functions)&lt;/li&gt;
&lt;li&gt;Advanced concepts (Markov chains, hidden Markov models, Bayesian inference)&lt;/li&gt;
&lt;li&gt;Statistics for ML (estimation, hypothesis testing)&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h2&gt;Machine learning fundamentals&lt;/h2&gt;
&lt;h3&gt;What is machine learning?&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Prompt:&lt;/strong&gt; What machine learning concepts should I know to fully understand GPT-3?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Response:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Key concepts include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;How artificial neural networks function&lt;/li&gt;
&lt;li&gt;The difference between supervised and unsupervised learning algorithms&lt;/li&gt;
&lt;li&gt;Types of reinforcement learning algorithms&lt;/li&gt;
&lt;li&gt;The concept of a feature vector&lt;/li&gt;
&lt;li&gt;How to perform data pre-processing&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Supervised learning&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Prompt:&lt;/strong&gt; What should I know about supervised learning?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Response:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Supervised learning is a type of machine learning where the data is labeled and the algorithm is trained to learn from this data. This data can be in the form of a dataset where each data point is labeled with the correct output, or a set of instructions showing how to perform a specific task.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Prompt:&lt;/strong&gt; Write a curriculum for the most important supervised learning concepts&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Response:&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Linear Regression&lt;/li&gt;
&lt;li&gt;Logistic Regression&lt;/li&gt;
&lt;li&gt;Support Vector Machines&lt;/li&gt;
&lt;li&gt;Decision Trees&lt;/li&gt;
&lt;li&gt;Neural Networks&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;Unsupervised learning&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Prompt:&lt;/strong&gt; Write a curriculum for the most important unsupervised learning concepts&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Response:&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Dimensionality reduction&lt;/strong&gt;: Methods for reducing the number of features while retaining information. Useful for visualization, storage, and improving algorithm performance.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Clustering&lt;/strong&gt;: Methods for grouping data points into meaningful groups. Used to find similar points, partition datasets, or find outliers.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Feature selection&lt;/strong&gt;: Methods for selecting the most useful subset of features. Improves accuracy, reduces complexity, and increases interpretability.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Data preprocessing&lt;/strong&gt;: Methods for transforming data into a more suitable form for learning.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h2&gt;Deep learning&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Prompt:&lt;/strong&gt; Write a curriculum for the most important deep learning concepts&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Response:&lt;/strong&gt;&lt;/p&gt;
&lt;h3&gt;Artificial Neural Networks (ANNs)&lt;/h3&gt;
&lt;p&gt;ANNs are algorithmically-based models that simulate the workings of the human brain. They’re composed of interconnected processing nodes (neurons) that learn to recognize patterns in input data, enabling complex tasks like image recognition or machine translation.&lt;/p&gt;
&lt;h3&gt;Convolutional Neural Networks (CNNs)&lt;/h3&gt;
&lt;p&gt;CNNs are designed to work with two-dimensional data like images. They use convolutional layers to extract features and pooling layers to downsample data and reduce computational load.&lt;/p&gt;
&lt;h3&gt;Recurrent Neural Networks (RNNs)&lt;/h3&gt;
&lt;p&gt;RNNs work with sequential data like text. They use recurrent layers that perform operations on vectors to extract features from sequences.&lt;/p&gt;
&lt;h3&gt;Long Short-Term Memory Networks (LSTMs)&lt;/h3&gt;
&lt;p&gt;LSTMs are RNNs designed to model long-term dependencies in data. They solve the vanishing gradient problem that affects standard RNNs.&lt;/p&gt;
&lt;h3&gt;Autoencoders&lt;/h3&gt;
&lt;p&gt;Autoencoders learn compressed representations of data. They consist of an encoding layer that learns the representation and a decoding layer that reconstructs the input.&lt;/p&gt;
&lt;hr /&gt;
&lt;h2&gt;Support Vector Machines&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Prompt:&lt;/strong&gt; Write an advanced guide for a programmer to study support vector machines&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Response:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The key idea behind SVMs is to find a decision boundary (hyperplane) that maximizes the margin between two classes.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Key concepts:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Margin&lt;/strong&gt;: The distance between the decision boundary and the closest data points. Larger margins mean more confident predictions.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Linear vs non-linear SVMs&lt;/strong&gt;: Linear SVMs find linear boundaries; non-linear SVMs can find curved boundaries for data that isn’t linearly separable.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Kernels&lt;/strong&gt;: Common options include linear, polynomial, and RBF kernels.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Practical tips:&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Scale your data so all features are on the same scale (standardization or normalization)&lt;/li&gt;
&lt;li&gt;Choose the right kernel for your data&lt;/li&gt;
&lt;li&gt;Tune the C parameter (trade-off between margin and misclassification) and gamma parameter (shape of decision boundary)&lt;/li&gt;
&lt;/ol&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Prompt:&lt;/strong&gt; Explain what a “decision boundary” is&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Response:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;A decision boundary is the line or surface that separates the output classes of a machine learning model. In SVMs, it’s the hyperplane that separates positive and negative examples in the feature space.&lt;/p&gt;
&lt;hr /&gt;
&lt;h2&gt;Tools and software&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Prompt:&lt;/strong&gt; Write a curriculum for the most important software programs for machine learning&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Response:&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;TensorFlow&lt;/strong&gt;: Open source library for building and training neural networks&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;scikit-learn&lt;/strong&gt;: Library providing algorithms for supervised and unsupervised learning&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Keras&lt;/strong&gt;: High-level API for building and training neural networks&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h2&gt;Understanding GPT-3&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Prompt:&lt;/strong&gt; Write a study guide on how to understand GPT-3&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Response:&lt;/strong&gt;&lt;/p&gt;
&lt;h3&gt;How GPT-3 works&lt;/h3&gt;
&lt;p&gt;GPT-3 is a computer system that learns by example. Given training data, it finds patterns in that data. For instance, given sentences, it learns the grammar rules governing them.&lt;/p&gt;
&lt;h3&gt;Interpreting results&lt;/h3&gt;
&lt;p&gt;GPT-3 provides ranked results with the most likely first. However, don’t always take the first result as correct. The second or third result may sometimes be more accurate.&lt;/p&gt;
&lt;h3&gt;Key concepts needed&lt;/h3&gt;
&lt;p&gt;To understand GPT-3, you need knowledge of:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Supervised and unsupervised learning&lt;/li&gt;
&lt;li&gt;Neural networks&lt;/li&gt;
&lt;li&gt;Deep learning&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Once you understand these concepts, you’ll better understand how GPT-3 works.&lt;/p&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Algorithms Boot Camp</title><link>https://briansunter.com/algorithms-boot-camp</link><guid isPermaLink="true">https://briansunter.com/algorithms-boot-camp</guid><description>A structured learning path through data structures and algorithms fundamentals.</description><pubDate>Sun, 10 Jul 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/image_1657488579000_0_1672131758605_0.CNKnTset_OiXGJ.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;p&gt;Data structures and algorithms are among the most valuable concepts to learn in computer science. This boot camp organizes my notes into a structured learning path.&lt;/p&gt;
&lt;h2&gt;About this guide&lt;/h2&gt;
&lt;p&gt;I’m writing this from a student’s perspective, not an expert’s. I’ll be learning alongside you and solidifying my own knowledge as I go.&lt;/p&gt;
&lt;p&gt;Feel free to &lt;a href=&quot;https://twitter.com/Bsunter&quot;&gt;correct me, make suggestions, and ask questions on Twitter&lt;/a&gt;. This guide is a living document.&lt;/p&gt;
&lt;h2&gt;Why learn algorithms?&lt;/h2&gt;
&lt;p&gt;Sometimes you’ll face complex problems at work that require deep knowledge of data structures and algorithms.&lt;/p&gt;
&lt;p&gt;Without understanding algorithms, you might:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Write code that runs extremely inefficiently&lt;/li&gt;
&lt;li&gt;Build something that works for small inputs but breaks on large ones&lt;/li&gt;
&lt;li&gt;Attempt to implement something that’s not theoretically possible to do efficiently&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Companies also ask algorithm questions in technical interviews. Even if you don’t use them daily, you should know them for interviewing.&lt;/p&gt;
&lt;h2&gt;Who is this for?&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Programmers who want to get better at algorithms&lt;/li&gt;
&lt;li&gt;Experienced developers looking to solidify their knowledge&lt;/li&gt;
&lt;li&gt;Anyone interested in learning how to take structured notes on code&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Roadmap&lt;/h2&gt;
&lt;h3&gt;Phase 1: Foundations&lt;/h3&gt;
&lt;h4&gt;Intro to Algorithms, Sorting, and Time Complexity&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://briansunter.com/intro-to-algorithms&quot;&gt;intro-to-algorithms&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;What is an algorithm?&lt;/li&gt;
&lt;li&gt;Data structures 101&lt;/li&gt;
&lt;li&gt;Sorting and bubble sort&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href=&quot;https://briansunter.com/time-complexity&quot;&gt;time-complexity&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;posteriori-vs-a-priori-analysis-of-algorithms|A posteriori vs a priori analysis&lt;/li&gt;
&lt;li&gt;Big O notation&lt;/li&gt;
&lt;li&gt;Worst, average, and best case analysis&lt;/li&gt;
&lt;li&gt;Recurrence relations&lt;/li&gt;
&lt;li&gt;Arithmetic series&lt;/li&gt;
&lt;li&gt;Bubble sort analysis&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;TypeScript Overview&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;TypeScript intro&lt;/li&gt;
&lt;li&gt;Intermediate TypeScript&lt;/li&gt;
&lt;li&gt;Test-driven development&lt;/li&gt;
&lt;li&gt;Design patterns&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;Recursion&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Fundamentals&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Recursion 101&lt;/li&gt;
&lt;li&gt;Base case&lt;/li&gt;
&lt;li&gt;Inductive step&lt;/li&gt;
&lt;li&gt;Recursive case&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Examples&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Recursive exponent&lt;/li&gt;
&lt;li&gt;Fibonacci numbers&lt;/li&gt;
&lt;li&gt;Is palindrome&lt;/li&gt;
&lt;li&gt;Pascal’s triangle&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Backtracking&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Valid parenthesis&lt;/li&gt;
&lt;li&gt;N-Queens problem&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Limitations&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Call stack&lt;/li&gt;
&lt;li&gt;Tail recursion&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;Divide and Conquer&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Merge sort&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;Linked Lists&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Linked List 101&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;TypeScript implementation&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Operations&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Insert&lt;/li&gt;
&lt;li&gt;Delete&lt;/li&gt;
&lt;li&gt;Find&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Problems&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Reverse a linked list&lt;/li&gt;
&lt;li&gt;Merge two sorted linked lists&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h2&gt;Complete topic reference&lt;/h2&gt;
&lt;p&gt;This is a comprehensive list of all topics covered in the boot camp.&lt;/p&gt;
&lt;h3&gt;Arrays&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Concepts:&lt;/strong&gt; 2D arrays, n-dimensional arrays, jagged arrays&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Problems:&lt;/strong&gt; Two sum, search index, kth largest element&lt;/p&gt;
&lt;h3&gt;Linked lists&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Operations:&lt;/strong&gt; Insert, delete, find, reverse, counting, finding middle, merging, kth to last, detecting cycles&lt;/p&gt;
&lt;h3&gt;Stacks and queues&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Stack:&lt;/strong&gt; Towers of Hanoi&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Queue:&lt;/strong&gt; LIFO, FIFO&lt;/p&gt;
&lt;h3&gt;Trees&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Concepts:&lt;/strong&gt; Root, edge, leaf, depth&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Binary trees:&lt;/strong&gt; Binary search trees, level order traversal, construct tree from traversal&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Balanced trees:&lt;/strong&gt; AVL tree, B-tree&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Operations:&lt;/strong&gt; Insertion, deletion, traversal (pre-order, in-order, post-order), search (BFS, DFS), find min/max, find successor/predecessor&lt;/p&gt;
&lt;h3&gt;Hash tables&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Implementations:&lt;/strong&gt; Array, linked list, binary tree&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Operations:&lt;/strong&gt; Get, put, delete&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Concepts:&lt;/strong&gt; Hash function, linear probing, quadratic probing, collision resolution&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Problems:&lt;/strong&gt; LRU cache&lt;/p&gt;
&lt;h3&gt;Heaps&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Priority queue:&lt;/strong&gt; Compare function, enqueue, dequeue, peek&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Concepts:&lt;/strong&gt; Complete binary tree, array representation, min heap, max heap&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Operations:&lt;/strong&gt; Build, insert, get, delete, heapify, heap sort in place&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Problems:&lt;/strong&gt; Merge k sorted lists, kth largest element, the skyline problem&lt;/p&gt;
&lt;h3&gt;Tries&lt;/h3&gt;
&lt;p&gt;Compressed trie, suffix trie&lt;/p&gt;
&lt;h3&gt;Advanced data structures&lt;/h3&gt;
&lt;p&gt;Skip list, suffix tree, suffix array, bloom filter&lt;/p&gt;
&lt;h3&gt;Sorting&lt;/h3&gt;
&lt;p&gt;Bubble sort, insertion sort, merge sort, quick sort, radix sort, counting sort, sort stability&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Problems:&lt;/strong&gt; Dutch national flag, merge two sorted arrays&lt;/p&gt;
&lt;h3&gt;Graphs&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Concepts:&lt;/strong&gt; Graph theory, pathfinding, connectivity, shortest path, minimum spanning tree, cycles, disjoint graph&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Traversal:&lt;/strong&gt; BFS, DFS, bipartite graph, topological sort&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Algorithms:&lt;/strong&gt; Dijkstra’s, Bellman-Ford, Floyd-Warshall, Prim’s, Kruskal’s&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Representations:&lt;/strong&gt; Adjacency list, adjacency matrix&lt;/p&gt;
&lt;h3&gt;Recursion&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Concepts:&lt;/strong&gt; Backtracking, base case, recursive case, inductive step, tail recursion, memoization&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Problems:&lt;/strong&gt; Factorial, exponent, subsets, Fibonacci, Pascal’s triangle, Towers of Hanoi, binary strings, letter case permutations, permutations, subset sum, generate parenthesis, N-Queens, subarray sum equals k, valid parenthesis&lt;/p&gt;
&lt;h3&gt;String algorithms&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Concepts:&lt;/strong&gt; String matching, pattern matching, string search, data compression, edit distance, substring search, string similarity&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Algorithms:&lt;/strong&gt; Rabin-Karp, KMP (Knuth-Morris-Pratt)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Problems:&lt;/strong&gt; Non-repeating characters, anagram, palindrome, frequency counting, reverse&lt;/p&gt;
&lt;h3&gt;Dynamic programming&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Problems:&lt;/strong&gt; 0/1 knapsack, longest common subsequence, subset sum, minimum edit distance, minimum coins, longest increasing subsequence, longest palindromic subsequence, text justification&lt;/p&gt;
&lt;h3&gt;Network flow&lt;/h3&gt;
&lt;p&gt;Maximum flow, minimum cut, Ford-Fulkerson, Edmonds-Karp, Dinic’s algorithm, König’s theorem&lt;/p&gt;
&lt;h3&gt;NP-complete problems&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Approximation methods:&lt;/strong&gt; Simulated annealing, tabu search, genetic algorithms, ant colony optimization, particle swarm optimization&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Classic problems:&lt;/strong&gt; Set cover, knapsack, bin packing, vertex cover, Hamiltonian path, traveling salesman, satisfiability, partition, clique, chromatic number&lt;/p&gt;
&lt;h3&gt;Search algorithms&lt;/h3&gt;
&lt;p&gt;Linear search, binary search, DFS, BFS, best-first search, A* search, Dijkstra’s, Bellman-Ford, Floyd-Warshall, Johnson’s algorithm&lt;/p&gt;
&lt;h3&gt;Algorithm design&lt;/h3&gt;
&lt;p&gt;Greedy algorithms, dynamic programming, divide and conquer, decrease and conquer, transform and conquer, randomized algorithms&lt;/p&gt;
&lt;h3&gt;Algorithm analysis&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Time complexity:&lt;/strong&gt; Big-O, Omega, Theta, little-o notation&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Series:&lt;/strong&gt; Arithmetic, harmonic, arithmetic-geometric&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Space complexity&lt;/strong&gt;&lt;/p&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Almanack of Naval Ravikant</title><link>https://briansunter.com/almanack-of-naval-ravikant</link><guid isPermaLink="true">https://briansunter.com/almanack-of-naval-ravikant</guid><description>A collection of tweets on the philosophy of life, wealth, relationships, learning, and health from the investor and founder of AngelList Naval Ravikant.</description><pubDate>Sun, 10 Jul 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/41ZZY5kzLL_1670306664477_0.CQVdeDHf_Zqp10r.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h1&gt;The Book in 3 Sentences&lt;/h1&gt;
&lt;p&gt;This free book is a collection of tweets on the philosophy of life, wealth, relationships, learning, and health from the investor and founder of AngelList &lt;a href=&quot;https://twitter.com/naval&quot;&gt;Naval Ravikant&lt;/a&gt;, which &lt;a href=&quot;https://www.navalmanack.com/&quot;&gt;you can download for free here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;He emphasizes the importance of creating leverage and playing long-term games where you can take advantage of compounding interest.
He advocates being authentic, following your curiosity, and using the internet and software to leverage your unique skills and interests.&lt;/p&gt;
&lt;h1&gt;Impressions&lt;/h1&gt;
&lt;p&gt;I enjoyed this book; although it isn’t traditional, it’s a collection of insightful tweets on various subjects. It reminds me of Tim Ferriss’s Tribe of Mentors.
A lot of the tweets say similar things in different ways. I overall enjoyed reading many different takes on the same things, but sometimes it could be more varied.
My favorite themes were the ones on creating leverage and authenticity.&lt;/p&gt;
&lt;h1&gt;Who Should Read It?&lt;/h1&gt;
&lt;p&gt;Anyone interested in startups, wealth creation, health, and productivity.
Anyone new to Naval’s tweets and way of thinking.
Someone OK with a loose collection of tweets rather than a traditional long-form book.&lt;/p&gt;
&lt;h1&gt;How the Book Changed Me&lt;/h1&gt;
&lt;p&gt;This book motivated me to leverage my authenticity, be accountable, take risks, and follow my passions and curiosity instead of blindly playing someone else’s games.
The book made me think about how to create leverage in my interests and how leverage is much more critical than raw effort or productivity.
It encouraged me to really think hard about the few decisions that really matter, like which relationships to get into, what city to live in, which job to take. These completely change the trajectory of your life, but most of us don’t spend as much time deliberating these as we should. You should really take the time to figure out what should work on.
It made me think about being authentic and doing things I’m passionate about for their own sake as much as possible and to avoid playing status games.
The book further encouraged me to take my happiness seriously.&lt;/p&gt;
&lt;h1&gt;My Top 3 Quotes&lt;/h1&gt;
&lt;blockquote&gt;
&lt;p&gt;Specific knowledge is knowledge you cannot be trained for. If society can train you, it can train someone else and replace you.
Fortunes require leverage. Business leverage comes from capital, people, and products with no marginal cost of replication (code and media). Capital and labor are permissioned leverage. Everyone is chasing capital, but someone has to give it to you. Everyone is trying to lead, but someone has to follow you. Code and media are permissionless leverage. They’re the leverage behind the newly rich. You can create software and media that works for you while you sleep.
Spend more time making the big decisions. There are basically three really big decisions you make in your early life: where you live, who you’re with, and what you do. We spend very little time deciding which relationship to get into. We spend so much time in a job, but we spend so little time deciding which job to get into. Choosing what city to live in can almost completely determine the trajectory of your life, but we spend so little time trying to figure out what city to live in.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h1&gt;Summary + Notes&lt;/h1&gt;
&lt;h2&gt;Building Wealth&lt;/h2&gt;
&lt;h3&gt;Focus on Wealth and Equity&lt;/h3&gt;
&lt;p&gt;To become wealthy, you have to own equity, the products of your labor. You’ll never get rich renting out your time.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Without ownership, your inputs are very closely tied to your outputs. In almost any salaried job, even one paying a lot per hour like a lawyer or a doctor, you’re still putting in the hours, and every hour you get paid.
Wealth is the thing you want. Wealth is assets that earn while you sleep. Wealth is the factory, the robots, cranking out things. Wealth is the computer program that’s running at night, serving other customers. Wealth is even money in the bank that is being reinvested into other assets, and into other businesses.
Ignore people playing status games. They gain status by attacking people playing wealth creation games.
An old boss once warned: “You’ll never be rich since you’re obviously smart, and someone will always offer you a job that’s just good enough.”
The Industrial Revolution and factories made us extremely hierarchical because one individual couldn’t necessarily own or build a factory, but now, thanks to the internet, we’re going back to an age where more and more people can work for themselves&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Arm Yourself with Specific Knowledge&lt;/h3&gt;
&lt;p&gt;Specific knowledge is highly technical or creative work that has yet to be fully figured out. You can find it by following your genuine curiosity. It will feel like play to you and work to someone else.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Specific knowledge is found much more by pursuing your innate talents, your genuine curiosity, and your passion. It’s not by going to school for whatever is the hottest job; it’s not by going into whatever field investors say is the hottest.
Specific knowledge is at the edge of knowledge. It’s also stuff that’s only now being figured out or is really hard to figure out. If you’re not 100 percent into it, somebody else who is 100 percent into it will outperform you
Specific knowledge could be:
• Sales skills
• Musical talents, with the ability to pick up any instrument
• An obsessive personality: you dive into things and remember them quickly
• Love for science fiction: you were into reading sci-fi, which means you absorb a lot of knowledge very quickly
• Playing a lot of games, you understand game theory pretty well
• Gossiping, digging into your friend network. That might make you into a very interesting journalist.
It’s much more important today to be able to become an expert in a brand-new field in nine to twelve months than to have studied the “right” thing a long time ago
When specific knowledge is taught, it’s through apprenticeships, not schools.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Create Leverage&lt;/h3&gt;
&lt;p&gt;Spend a lot of time deciding on the crucial high-leverage decisions in your life, like what to work on, who to work with, and where to live.
To create wealth, you need to leverage what you do. One of the best ways to do this is using “permissionless leverage,” like coding or media that you can start utilizing today, rather than labor or capital.
The main forms of leverage are &lt;strong&gt;code&lt;/strong&gt;, &lt;strong&gt;media&lt;/strong&gt;, &lt;strong&gt;capital&lt;/strong&gt;, and &lt;strong&gt;labor&lt;/strong&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;One form of leverage is labor—other humans working for you. It is the oldest form of leverage, is actually not a great one in the modern world. I would argue this is the worst form of leverage that you could possibly use. Managing other people is incredibly messy. It requires tremendous leadership skills. You’re one short hop from a mutiny or getting eaten or torn apart by the mob.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;blockquote&gt;
&lt;p&gt;Labor means people working for you. It’s the oldest and most fought-over form of leverage. Labor leverage will impress your parents, but don’t waste your life chasing it.
Capital is a trickier form of leverage to use. It’s more modern. It’s the one that people have used to get fabulously wealthy in the last century. It’s probably been the dominant form of leverage in the last century. If you get good at managing capital, you can manage more and more capital much more easily than you can manage more and more people.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;blockquote&gt;
&lt;p&gt;An army of robots is freely available—it’s just packed in data centers for heat and space efficiency. Use it.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;blockquote&gt;
&lt;p&gt;If you can’t code, write books and blogs, record videos and podcasts.
In an age of leverage, one correct decision can win everything.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Play Long Term Games and Focus on Compounding Interest&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;Play iterated games. All the returns in life, whether in wealth, relationships, or knowledge, come from compound interest.
Compound interest also happens in your reputation. If you have a sterling reputation and you keep building it for decades upon decades, people will notice.
Your reputation will literally end up being thousands or tens of thousands of times more valuable than somebody else who was very talented but is not keeping the compound interest
When you find the right thing to do, when you find the right people to work with, invest deeply. Sticking with it for decades is really how you make the big returns in your relationships and in your money. So, compound interest is very important.
In a long-term game, it seems that everybody is making each other rich. And in a short-term game, it seems like everybody is making themselves rich.”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Embrace Accountability&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;Embrace accountability and take business risks under your own name. Society will reward you with responsibility, equity, and leverage.
You have to build credibility, and you have to do it under your own name as much as possible, which is risky. So, accountability is a double-edged thing. It allows you to take credit when things go well and to bear the brunt of the failure when things go badly
There’s not really that much to fear in terms of failure, and so people should take on a lot more accountability than they do.
The one thing you have to avoid is the risk of ruin. Avoiding ruin means stay out of jail.
Avoiding ruin could also mean you stay out of things that could be physically dangerous or hurt your body. Stay out of things that could cause you to lose all of your capital, all of your savings&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Be in Control of Your Time&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;Forty hour work weeks are a relic of the Industrial Age. Knowledge workers function like athletes—train and sprint, then rest and reassess.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;blockquote&gt;
&lt;p&gt;Choosing what kinds of jobs, careers, or fields you get into and what sort of deals you’re willing to take from your employer will give you much more free time. Then, you don’t have to worry as much about time management.
Value your time at an hourly rate, and ruthlessly spend to save time at that rate. You will never be worth more than you think you’re worth.
It’s actually really important to have empty space. If you don’t have a day or two every week in your calendar where you’re not always in meetings, and you’re not always busy, then you’re not going to be able to think.
It’s only after you’re bored you have the great ideas. It’s never going to be when you’re stressed, or busy, running around or rushed. Make the time.
Anyone who has known me for a long time knows my defining characteristic is a combination of being very impatient and willful. I don’t like to wait. I hate wasting time. I’m very famous for being rude at parties, events, dinners, where the moment I figure out it’s a waste of my time, I leave immediately.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Be Authentic and Love What You Do&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;Be a maker who makes something interesting people want. Show your craft, practice your craft, and the right people will eventually find you.
Be a maker who makes something interesting people want. Show your craft, practice your craft, and the right people will eventually find you.”
Become the best at what you do. Refine what you do until this is true. Opportunity will seek you out. Luck becomes your destiny.
When I was younger, I used to be so desperate to make money that I would have done anything. If you’d shown up and said, “Hey, I’ve got a sewage trucking business, want to go into that?” I would have said, “Great, I want to make money!” Thank God no one gave me that opportunity&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Study the Fundamentals and Create Mental Models&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;I was really into complexity theory back in the mid-90s. The more I got into it, the more I understand the limits of our knowledge and the limits of our prediction capability. Complexity has been super helpful to me. It has helped me come to a system that operates in the face of ignorance. I believe we are fundamentally ignorant and very, very bad at predicting the future
Microeconomics and game theory are fundamental. I don’t think you can be successful in business or even navigate most of our modern capitalist society without an extremely good understanding of supply-and-demand, labor-versus-capital, game theory, and those kinds of things.
I think basic mathematics is really underrated. If you’re going to make money, if you’re going to invest money, your basic math should be really good. You don’t need to learn geometry, trigonometry, calculus, or any of the complicated stuff if you’re just going into business. But you want arithmetic, probability, and statistics. Those are extremely important. Crack open a basic math book, and make sure you are really good at multiplying, dividing, compounding, probability, and statistics
There’s a new branch of probability statistics, which is really around tail events. Black swans are extreme probabilities. Again, I have to refer back to Nassim Taleb, who I think is one of the greatest philosopher-scientists of our times. He’s really done a lot of pioneering work on this.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;blockquote&gt;
&lt;p&gt;Least understood, but the most important principle for anyone claiming “science” on their side—falsifiability. If it doesn’t make falsifiable predictions, it’s not science. For you to believe something is true, it should have predictive power, and it must be falsifiable.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;blockquote&gt;
&lt;p&gt;Any book that survived for two thousand years has been filtered through many people. The general principles are more likely to be correct. I wanted to get back into reading these sorts of books.
Reading science, math, and philosophy one hour per day will likely put you at the upper echelon of human success within seven years.
The real truths are heresies. They cannot be spoken. Only discovered, whispered, and perhaps read.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Happiness&lt;/h3&gt;
&lt;p&gt;Take your happiness seriously and make an effort to cultivate it.
Your happiness mostly comes from your attitude and state of mind, rather than what you have or accomplish.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The three big ones in life are wealth, health, and happiness. We pursue them in that order, but their importance is reverse.
For some people I know, it’s a flow state. For some people, it’s satisfaction. For some people, it’s a feeling of contentment. My definition keeps evolving. The answer I would have given you a year ago will be different than what I tell you now.
Every Desire Is a Chosen Unhappiness.
Every time you catch yourself desiring something, say, “Is it so important to me I’ll be unhappy unless this goes my way?
Doing something because you “should” basically means you don’t actually want to do it. It’s just making you miserable, so I’m trying to eliminate as many “shoulds” from my life as possible.
Buffett has a great example when he asks if you want to be the world’s best lover and known as the worst, or the world’s worst lover and known as the best? [paraphrased] in reference to an inner or external scorecard.
A personal metric: how much of the day is spent doing things out of obligation rather than out of interest?
The one I found works best for me is called Choiceless Awareness, or Nonjudgmental Awareness. As you’re going about your daily business (hopefully, there’s some nature) and you’re not talking to anybody else, you practice learning to accept the moment you’re in without making judgments. You don’t think, “Oh, there’s a homeless guy over there, better cross the street” or look at someone running by and say, “He’s out of shape, and I’m in better shape than him.”
You lost your childhood sense of wonder and of being present and happy. You lost your inner happiness because you built up this personality of unresolved pain, errors, fears, and desires that glommed onto you like a bunch of barnacles&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Naval’s Reading List&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;These are a list of books that Naval recommends&lt;/li&gt;
&lt;li&gt;The Beginning of Infinity: Explanations That Transform the World by David Deutsch&lt;/li&gt;
&lt;li&gt;Sapiens: A Brief History of Humankind by Yuval Noah Harari&lt;/li&gt;
&lt;li&gt;The Rational Optimist: How Prosperity Evolves by Matt Ridley&lt;/li&gt;
&lt;li&gt;Genome: The Autobiography of a Species in 23 Chapters&lt;/li&gt;
&lt;li&gt;The Red Queen: Sex and the Evolution of Human Nature&lt;/li&gt;
&lt;li&gt;The Origins of Virtue: Human Instincts and the Evolution of Cooperation&lt;/li&gt;
&lt;li&gt;The Evolution of Everything: How New Ideas Emerge&lt;/li&gt;
&lt;li&gt;Skin in the Game by Nassim Taleb&lt;/li&gt;
&lt;li&gt;The Bed of Procrustes: Philosophical and Practical Aphorisms by Nassim Taleb&lt;/li&gt;
&lt;li&gt;The Black Swan: The Impact of the Highly Improbable&lt;/li&gt;
&lt;li&gt;Antifragile: Things That Gain from Disorder&lt;/li&gt;
&lt;li&gt;Fooled by Randomness&lt;/li&gt;
&lt;li&gt;Six Easy Pieces: Essentials of Physics Explained by Its Most Brilliant Teacher by Richard Feynman&lt;/li&gt;
&lt;li&gt;Six Not-So-Easy Pieces: Einstein’s Relativity, Symmetry, and Space-Time&lt;/li&gt;
&lt;li&gt;Perfectly Reasonable Deviations from the Beaten Track by Feynman&lt;/li&gt;
&lt;li&gt;Genius: The Life and Science of Richard Feynman&lt;/li&gt;
&lt;li&gt;Thing Explainer: Complicated Stuff in Simple Words by Randall Munroe&lt;/li&gt;
&lt;li&gt;The Lessons of History by Will and Ariel Durant&lt;/li&gt;
&lt;li&gt;The Sovereign Individual: Mastering the Transition to the Information Age by James Dale Davidson&lt;/li&gt;
&lt;li&gt;Poor Charlie’s Almanack: The Wit and Wisdom of Charles T. Munger by Charlie Munger (edited by Peter Kaufman)&lt;/li&gt;
&lt;li&gt;Reality Is Not What It Seems: The Journey to Quantum Gravity by Carlo Rovelli&lt;/li&gt;
&lt;li&gt;Seven Brief Lessons on Physics by Carlo Rovelli&lt;/li&gt;
&lt;li&gt;The Compleat Strategyst: Being a Primer on the Theory of Games of Strategy&lt;/li&gt;
&lt;li&gt;Williams and The Evolution of Cooperation by Robert Axelrod&lt;/li&gt;
&lt;li&gt;Everything by Jed McKenna&lt;/li&gt;
&lt;li&gt;Theory of Everything (The Enlightened Perspective) - Dreamstate Trilogy&lt;/li&gt;
&lt;li&gt;Jed McKenna’s Notebook&lt;/li&gt;
&lt;li&gt;Everything by Kapil Gupta, MD&lt;/li&gt;
&lt;li&gt;Master’s Secret Whispers&lt;/li&gt;
&lt;li&gt;Direct Truth&lt;/li&gt;
&lt;li&gt;Atmamun: The Path to achieving the bliss of the Himalayan Swamis&lt;/li&gt;
&lt;li&gt;The Book of Life by Jiddu Krishnamurti&lt;/li&gt;
&lt;li&gt;Total Freedom: The Essential Krishnamurti by Jiddu Krishnamurti&lt;/li&gt;
&lt;li&gt;Siddhartha by Herman Hesse&lt;/li&gt;
&lt;li&gt;The Book of Secrets by Osho&lt;/li&gt;
&lt;li&gt;The Great Challenge: Exploring the World Within by Osho&lt;/li&gt;
&lt;li&gt;The Way to Love: The Last Meditations of Anthony de Mello by Anthony de Mello&lt;/li&gt;
&lt;li&gt;The Untethered Soul: The Journey Beyond Yourself by Michael Singer&lt;/li&gt;
&lt;li&gt;Meditations by Marcus Aurelius&lt;/li&gt;
&lt;li&gt;Love Yourself Like Your Life Depends on It by Kamal Ravikant&lt;/li&gt;
&lt;li&gt;The Tao of Seneca: Practical Letters from a Stoic Master&lt;/li&gt;
&lt;li&gt;How to Change Your Mind by Michael Pollan&lt;/li&gt;
&lt;li&gt;Striking Thoughts: Bruce Lee’s Wisdom for Daily Living by Bruce Lee&lt;/li&gt;
&lt;li&gt;The Prophet by Kahlil Gibran&lt;/li&gt;
&lt;li&gt;Tao Te Ching&lt;/li&gt;
&lt;li&gt;Ficciones by Jorge Luis Borges&lt;/li&gt;
&lt;li&gt;Stories of Your Life and Others by Ted Chiang&lt;/li&gt;
&lt;li&gt;Exhalation: Stories by Ted Chiang&lt;/li&gt;
&lt;li&gt;The Lifecycle of Software Objects by Ted Chiang&lt;/li&gt;
&lt;li&gt;Snow Crash by Neal Stephenson&lt;/li&gt;
&lt;li&gt;“The Last Question,” a short story by Isaac Asimov&lt;/li&gt;
&lt;li&gt;René Girard’s mimetic theory&lt;/li&gt;
&lt;li&gt;Pre-Suasion: A Revolutionary Way to Influence&lt;/li&gt;
&lt;li&gt;The Story of Philosophy: The Lives and Opinions of the Great Philosophers, also by Will Durant&lt;/li&gt;
&lt;li&gt;Emerson and some Chesterfield&lt;/li&gt;
&lt;li&gt;Leo Tolstoy&lt;/li&gt;
&lt;li&gt;Alan Watts&lt;/li&gt;
&lt;li&gt;Scott Adams&lt;/li&gt;
&lt;li&gt;God’s Debris&lt;/li&gt;
&lt;li&gt;Nietzsche&lt;/li&gt;
&lt;li&gt;Richard Bach book Illusions: The Adventures&lt;/li&gt;
&lt;li&gt;The Three-Body Problem [Cixin Liu]&lt;/li&gt;
&lt;li&gt;Sex at Dawn [Christopher Ryan]&lt;/li&gt;
&lt;li&gt;Transmetropolitan&lt;/li&gt;
&lt;li&gt;The Boys [Garth Ennis]&lt;/li&gt;
&lt;li&gt;Planetary [Warren Ellis], and&lt;/li&gt;
&lt;li&gt;The Sandman [Neil Gaiman]&lt;/li&gt;
&lt;li&gt;Poor Charlie’s Almanack edited by Peter Kaufman (of Charlie Munger’s work)&lt;/li&gt;
&lt;li&gt;Zero to One by Blake Masters (of Peter Thiel’s work)&lt;/li&gt;
&lt;li&gt;Seeking Wisdom (and others) by Peter Bevelin (of Buffett and Munger’s work)&lt;/li&gt;
&lt;li&gt;Berkshire Hathaway Letters to Shareholders edited by Max Olson (of Buffett’s work)&lt;/li&gt;
&lt;li&gt;Principles by Ray Dalio (and team)&lt;/li&gt;
&lt;/ul&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>newsletter-roadmap</title><link>https://briansunter.com/newsletter-roadmap</link><guid isPermaLink="true">https://briansunter.com/newsletter-roadmap</guid><description>Roadmap and plans for the newsletter</description><pubDate>Sun, 10 Jul 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;This is the content plan for my &lt;a href=&quot;https://briansunter.com/newsletter&quot;&gt;newsletter&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The dates are only rough guidelines, this is more of a content ordering and flow&lt;/p&gt;
&lt;h2&gt;Roadmap #.ol-nested&lt;/h2&gt;
&lt;h3&gt;intro &lt;a href=&quot;https://briansunter.com/newsletter/issue-1&quot;&gt;issue-1&lt;/a&gt; Jun 12th, 2022&lt;/h3&gt;
&lt;p&gt;Intro &lt;a href=&quot;https://briansunter.com/newsletter&quot;&gt;newsletter&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;More about what I’m doing&lt;/p&gt;
&lt;p&gt;Starting my public graph homepage&lt;/p&gt;
&lt;p&gt;Introducing my ai-powered-notetaking-with-the-gpt-3-logseq-plugin|Logseq Openai&lt;/p&gt;
&lt;h3&gt;Newsletter Project &lt;a href=&quot;https://briansunter.com/newsletter/issue-2&quot;&gt;issue-2&lt;/a&gt; Jun 19th, 2022&lt;/h3&gt;
&lt;p&gt;feedback on ai-powered-notetaking-with-the-gpt-3-logseq-plugin|Logseq Openai&lt;/p&gt;
&lt;p&gt;launching my logseq-get-youtube-captions plugin&lt;/p&gt;
&lt;h3&gt;Getting started with logseq &lt;a href=&quot;https://briansunter.com/newsletter/issue-3&quot;&gt;issue-3&lt;/a&gt; Jun 26th, 2022&lt;/h3&gt;
&lt;p&gt;logseq-get-youtube-captions&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://briansunter.com/omnivore-logseq-guide&quot;&gt;omnivore-logseq-guide&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Launching logseq-social-profile-franalbani&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://briansunter.com/logseq-getting-started&quot;&gt;logseq-getting-started&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://briansunter.com/building-a-second-brain&quot;&gt;building-a-second-brain&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Newsletter intro and Productivity with AI &lt;a href=&quot;https://briansunter.com/newsletter/issue-4&quot;&gt;issue-4&lt;/a&gt; Jul 3rd, 2022&lt;/h3&gt;
&lt;p&gt;logseq-tasks&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://briansunter.com/notetaking-with-ai&quot;&gt;notetaking-with-ai&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;summarize&lt;/p&gt;
&lt;p&gt;plan&lt;/p&gt;
&lt;p&gt;write&lt;/p&gt;
&lt;p&gt;study guide&lt;/p&gt;
&lt;p&gt;programming&lt;/p&gt;
&lt;p&gt;machine learning&lt;/p&gt;
&lt;p&gt;coding with ai&lt;/p&gt;
&lt;p&gt;codex&lt;/p&gt;
&lt;p&gt;copilot&lt;/p&gt;
&lt;p&gt;Edit&lt;/p&gt;
&lt;p&gt;Fine Tune&lt;/p&gt;
&lt;p&gt;CoAuthor&lt;/p&gt;
&lt;h3&gt;Algorithms Bootcamp and Elon Musk Jul 10th, 2022 &lt;a href=&quot;https://briansunter.com/newsletter/issue-5&quot;&gt;issue-5&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Updates&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://briansunter.com/algorithms-boot-camp&quot;&gt;algorithms-boot-camp&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;algorithms-boot-camp|Algorithms Boot Camp&lt;/p&gt;
&lt;p&gt;Productivity Toolkit&lt;/p&gt;
&lt;p&gt;comparison template (archived)&lt;/p&gt;
&lt;p&gt;Brain Food&lt;/p&gt;
&lt;p&gt;Quotes&lt;/p&gt;
&lt;p&gt;Draft&lt;/p&gt;
&lt;p&gt;If I could only pick one favorite podcast, it would be Huberman Labs, which is about health and neuroscience by a Stanford Professor, Andrew Huberman.&lt;/p&gt;
&lt;p&gt;I’ve been listening to every one of the Huberman Labs podcasts in order, and I really enjoyed this one.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://hubermanlab.com/master-your-sleep-and-be-more-alert-when-awake/&quot;&gt;MASTER YOUR SLEEP &amp;amp; BE MORE ALERT WHEN AWAKE - Huberman Labs Podcast&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;From a productivity perspective, sleep is one of my favorite subjects. I have trouble sleeping well consistently but feel so so much better when well rested.&lt;/p&gt;
&lt;p&gt;Likely you aren’t getting enough sleep - 33% of people are chronically sleep deprived. If you are trying to improve your life, fixing your sleep is the best place to start. Huberman points out in the podcast that some people have gone years without sleeping well. They don’t even remember what it feels to be rested.&lt;/p&gt;
&lt;p&gt;There are countless studies on how much sleep improves your health and performance, but it’s impossible to quantify how much better your life is experiencing the world with a lucid mind.&lt;/p&gt;
&lt;p&gt;There is a wealth of information in the podcast, but a couple points stood out to me, as someone trying to feel sleepy earlier.&lt;/p&gt;
&lt;p&gt;Summary&lt;/p&gt;
&lt;p&gt;Circadian rhythm is the sleep and wakefulness cycle you go through every 24 hours. It controls when you get sleepy.&lt;/p&gt;
&lt;p&gt;There are two many levers that affect your circadian rhythm: temperature and light.&lt;/p&gt;
&lt;p&gt;Getting bright outdoor light within 30 minutes of waking up sets your circadian rhytm.&lt;/p&gt;
&lt;p&gt;You also should avoid any bright lights at night, between 11pm and 4am&lt;/p&gt;
&lt;p&gt;Your core temperature will be at its lowest 2 hours before you wake up and gradually start to increase. Your temperature will peak around late afternoon and then gradually decrease towards the evening thus repeating the cycle.&lt;/p&gt;
&lt;p&gt;So to adjust your circadian rhythm, warm your body up at the appropriate time, with exercise or even a heater to be more alert, then cool yourself down at night to fall asleep.&lt;/p&gt;
&lt;p&gt;Link&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.sec.gov/Archives/edgar/data/1418091/000110465922078413/tm2220599d1_ex99-p.htm&quot;&gt;Elon Musk Rejects Twitter Deal&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Intro to Algorithms &lt;a href=&quot;https://briansunter.com/newsletter/issue-6&quot;&gt;issue-6&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Updates&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://briansunter.com/intro-to-algorithms&quot;&gt;intro-to-algorithms&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Productivity Toolkit&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://briansunter.com/logseq-projects&quot;&gt;logseq-projects&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;tour of my project template&lt;/p&gt;
&lt;p&gt;project-template&lt;/p&gt;
&lt;p&gt;Brain Food&lt;/p&gt;
&lt;p&gt;Quote&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Simplicity is a prerequisite for reliability.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Edsger W. Dijkstra&lt;/p&gt;
&lt;p&gt;One of my favorite tech talks of all time is &lt;a href=&quot;https://github.com/matthiasn/talk-transcripts/blob/master/Hickey_Rich/SimpleMadeEasy.md&quot;&gt;“Simple Made Easy” by Rich Hickey”&lt;/a&gt;. It’s mostly a philosophical talk, it doesn’t have much code in it.&lt;/p&gt;
&lt;iframe width=&quot;100%&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/SxdOUGdseq4&quot; frameborder=&quot;0&quot; loading=&quot;lazy&quot; allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen&gt;&lt;/iframe&gt;
&lt;p&gt;Link&lt;/p&gt;
&lt;p&gt;AI can play Stratego at an expert level now&lt;/p&gt;
&lt;p&gt;Stratego is one of the few iconic board games that AI has not yet mastered.&lt;/p&gt;
&lt;p&gt;This popular game has an enormous game tree on the order of 10^535 nodes, i.e., 10^175 times larger than that of Go.&lt;/p&gt;
&lt;p&gt;https://t.co/xXagujMfmw&lt;/p&gt;
&lt;h3&gt;Time Complexity - Intro&lt;/h3&gt;
&lt;p&gt;Updates&lt;/p&gt;
&lt;p&gt;Time Complexity&lt;/p&gt;
&lt;p&gt;two sum&lt;/p&gt;
&lt;p&gt;Productivity Toolkit&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://briansunter.com/100-newsletter-subscribers&quot;&gt;100-newsletter-subscribers&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Brain Food&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://briansunter.com/you-and-your-research&quot;&gt;you-and-your-research&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Quote&lt;/p&gt;
&lt;p&gt;Link&lt;/p&gt;
&lt;h3&gt;Intermediate typescript&lt;/h3&gt;
&lt;p&gt;Updates&lt;/p&gt;
&lt;p&gt;restoring-old-photos-with-ai&lt;/p&gt;
&lt;p&gt;typescript&lt;/p&gt;
&lt;p&gt;learnx in y minutes&lt;/p&gt;
&lt;p&gt;jest testing&lt;/p&gt;
&lt;p&gt;types patterns and generics&lt;/p&gt;
&lt;p&gt;Productivity Toolkit&lt;/p&gt;
&lt;p&gt;Capture &lt;a href=&quot;https://briansunter.com/building-a-second-brain&quot;&gt;building-a-second-brain&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;information diet&lt;/p&gt;
&lt;p&gt;markdown capture&lt;/p&gt;
&lt;p&gt;ios shortcuts with logseq&lt;/p&gt;
&lt;p&gt;geolocation capture&lt;/p&gt;
&lt;p&gt;watch capture&lt;/p&gt;
&lt;p&gt;Brain Food&lt;/p&gt;
&lt;p&gt;Quote&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No amount of observations of white swans can allow the inference that all swans are white, but the observation of a single black swan is sufficient to refute that conclusion.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Link&lt;/p&gt;
&lt;p&gt;UN Population study&lt;/p&gt;
&lt;p&gt;bubble-sort&lt;/p&gt;
&lt;h3&gt;Intro to Recursion&lt;/h3&gt;
&lt;p&gt;Updates&lt;/p&gt;
&lt;p&gt;Productivity Toolkit&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://briansunter.com/building-a-second-brain&quot;&gt;building-a-second-brain&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;organize&lt;/p&gt;
&lt;p&gt;Brain Food&lt;/p&gt;
&lt;p&gt;Quote&lt;/p&gt;
&lt;p&gt;Link&lt;/p&gt;
&lt;p&gt;meal-prep&lt;/p&gt;
&lt;p&gt;linear recursion&lt;/p&gt;
&lt;p&gt;factorial&lt;/p&gt;
&lt;p&gt;tree recursion&lt;/p&gt;
&lt;p&gt;fibbonacci number&lt;/p&gt;
&lt;h3&gt;Divide and Conquer&lt;/h3&gt;
&lt;p&gt;Updates&lt;/p&gt;
&lt;p&gt;merge sort&lt;/p&gt;
&lt;p&gt;Productivity Toolkit&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://briansunter.com/building-a-second-brain&quot;&gt;building-a-second-brain&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;distill&lt;/p&gt;
&lt;p&gt;Brain Food&lt;/p&gt;
&lt;p&gt;Quote&lt;/p&gt;
&lt;p&gt;Link&lt;/p&gt;
&lt;h3&gt;Quicksort&lt;/h3&gt;
&lt;p&gt;Updates&lt;/p&gt;
&lt;p&gt;quicksort&lt;/p&gt;
&lt;p&gt;pivot selection&lt;/p&gt;
&lt;p&gt;dutch national flag problem&lt;/p&gt;
&lt;p&gt;Productivity Toolkit&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://briansunter.com/building-a-second-brain&quot;&gt;building-a-second-brain&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;express&lt;/p&gt;
&lt;p&gt;Brain Food&lt;/p&gt;
&lt;p&gt;Quote&lt;/p&gt;
&lt;p&gt;Link&lt;/p&gt;
&lt;h3&gt;Sorting, Stacks, and Queues&lt;/h3&gt;
&lt;p&gt;Stack and Queue&lt;/p&gt;
&lt;p&gt;Stack&lt;/p&gt;
&lt;p&gt;Queue&lt;/p&gt;
&lt;p&gt;quicksort&lt;/p&gt;
&lt;h3&gt;Linked List&lt;/h3&gt;
&lt;p&gt;Insert&lt;/p&gt;
&lt;p&gt;Delete&lt;/p&gt;
&lt;p&gt;Reverse&lt;/p&gt;
&lt;p&gt;Middle&lt;/p&gt;
&lt;h3&gt;Tree&lt;/h3&gt;
&lt;p&gt;Binary Tree&lt;/p&gt;
&lt;p&gt;Binary Seach Tree&lt;/p&gt;
&lt;p&gt;Tree Find&lt;/p&gt;
&lt;p&gt;Tree Insert&lt;/p&gt;
&lt;p&gt;Tree Delete&lt;/p&gt;
&lt;p&gt;N-ary tree&lt;/p&gt;
&lt;p&gt;Balanced Binary Search Tree&lt;/p&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Newsletter Issue 5</title><link>https://briansunter.com/newsletter/issue-5</link><guid isPermaLink="true">https://briansunter.com/newsletter/issue-5</guid><description>Algorithms Bootcamp and the Elon Musk Controversy</description><pubDate>Sun, 10 Jul 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/image_1657488579000_0_1672131758605_0.CNKnTset_OiXGJ.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Summary and Reflection 🤔&lt;/h2&gt;
&lt;p&gt;I’m starting a 3(+) month-long algorithms-boot-camp|&quot;Algorithms Boot Camp&quot;. I’ve been collecting notes on this topic for some time.&lt;/p&gt;
&lt;h2&gt;Updates 🆕&lt;/h2&gt;
&lt;h3&gt;&lt;a href=&quot;https://briansunter.com/algorithms-boot-camp&quot;&gt;algorithms-boot-camp&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;algorithms-boot-camp|This is the 3-month curriculum for the &lt;a href=&quot;https://briansunter.com/algorithms-boot-camp&quot;&gt;algorithms-boot-camp&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;It’s a weekly series of guides that will help beginner and intermediate programmers learn the basics of algorithms.&lt;/p&gt;
&lt;p&gt;Hopefully, my process for making the guide and annotating code in logseq will also be interesting to non-programmers.&lt;/p&gt;
&lt;p&gt;I wrote a algorithms-boot-camp|comprehensive outline of all the algorithms I plan to learn. This “boot camp” project will build up this outline as a series of guides, one week at a time.&lt;/p&gt;
&lt;p&gt;I’m not writing this guide from an expert’s perspective but rather from a student’s perspective. I’ll be learning along with you and solidifying my knowledge.&lt;/p&gt;
&lt;h2&gt;Productivity Toolkit 🛠️&lt;/h2&gt;
&lt;h2&gt;Brain Food 🧠&lt;/h2&gt;
&lt;p&gt;In this section, I’ll share some interesting articles and “food for thought.”&lt;/p&gt;
&lt;h3&gt;Quote&lt;/h3&gt;
&lt;p&gt;The Huberman Show is my favorite health and science podcast.&lt;/p&gt;
&lt;p&gt;I enjoyed his podcast called &lt;a href=&quot;https://hubermanlab.com/master-your-sleep-and-be-more-alert-when-awake/&quot;&gt;Master Your Sleep &amp;amp; Be More Alert When Awake&lt;/a&gt;&lt;/p&gt;

  &lt;div class=&quot;not-prose tweet-embed&quot;&gt;
    &lt;div class=&quot;tweet-card&quot;&gt;
      &lt;a href=&quot;https://twitter.com/hubermanlab/status/1438316907598258177&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;&lt;/a&gt;
      &lt;div class=&quot;tweet-header&quot;&gt;
        &lt;div class=&quot;tweet-author&quot;&gt;
          &lt;img src=&quot;https://pbs.twimg.com/profile_images/1339713932085346306/jDTi4HKH_normal.jpg&quot; alt=&quot;Andrew D. Huberman, Ph.D.&apos;s avatar&quot; /&gt;
          &lt;div class=&quot;tweet-author-info&quot;&gt;
            &lt;a href=&quot;https://twitter.com/hubermanlab/status/1438316907598258177&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
              &lt;div class=&quot;tweet-author-name-row&quot;&gt;
                &lt;span class=&quot;tweet-author-name&quot;&gt;Andrew D. Huberman, Ph.D.&lt;/span&gt;
                

  


              &lt;/div&gt;
            &lt;/a&gt;
            &lt;span class=&quot;tweet-author-handle&quot;&gt;@hubermanlab&lt;/span&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;a href=&quot;https://twitter.com/hubermanlab/status/1438316907598258177&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;

  
    
  

&lt;/a&gt;
      &lt;/div&gt;
      
      &lt;div class=&quot;tweet-body&quot;&gt;Best nootropic: sleep
Best stress relief: sleep
Best trauma release: sleep
Best immune booster: sleep
Best hormone augmentation: sleep
Best emotional stabilizer: sleep
Sleep Tools: Ep. 2 Huberman Lab Podcast, HLP interview w/Matt Walker &lt;a href=&quot;http://hubermanlab.com/&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;hubermanlab.com&lt;/a&gt;&lt;/div&gt;
      
      
      &lt;a href=&quot;https://twitter.com/hubermanlab/status/1438316907598258177&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
        &lt;span class=&quot;tweet-timestamp&quot;&gt;Sep 16, 2021, 1:40 AM&lt;/span&gt;
      &lt;/a&gt;
      &lt;hr /&gt;
      &lt;div class=&quot;tweet-actions&quot;&gt;
        &lt;div class=&quot;tweet-action tweet-action-like&quot;&gt;
          

  
    
  


          &lt;span&gt;2.6K&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class=&quot;tweet-action tweet-action-reply&quot;&gt;
          

  
    
  


          &lt;span&gt;100&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  
&lt;h3&gt;Link of the week&lt;/h3&gt;
&lt;p&gt;Everyone has been talking about Elon Musk buying Twitter and the controversy around the “spam users.”&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://news.ycombinator.com/item?id=32027341&quot;&gt;See this HackerNews thread.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.bloomberg.com/opinion/articles/2022-07-09/elon-s-out&quot;&gt;Elon’s Out Article&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Outro&lt;/h2&gt;
&lt;p&gt;Check out the &lt;a href=&quot;https://briansunter.com/newsletter-roadmap&quot;&gt;newsletter-roadmap&lt;/a&gt; to see what I have in mind for future issues. Let me know on &lt;a href=&quot;https://twitter.com&quot;&gt;twitter @bsunter&lt;/a&gt;&lt;/p&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Generating Poodle Mix Names with AI</title><link>https://briansunter.com/poodle-mixes</link><guid isPermaLink="true">https://briansunter.com/poodle-mixes</guid><description>Teaching GPT-3 to invent names for every possible poodle crossbreed.</description><pubDate>Sun, 10 Jul 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;GPT-3 is good at generating ideas given a few examples. I gave it two poodle mix names and asked it to generate the rest.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Prompt:&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Generate poodle mix names:&lt;/p&gt;
&lt;p&gt;Poodle + Affenpinscher = Affenpoo&lt;/p&gt;
&lt;p&gt;Poodle + Afghan Hound = Afganipoo&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Sometimes it picks the traditional name (Labradoodle, Goldendoodle), sometimes it invents a new one (Japooney), and sometimes it just appends “poo” to the breed name (Bloodhoundpoo).&lt;/p&gt;
&lt;p&gt;Thanks to AI, every theoretical poodle mix now has a name.&lt;/p&gt;
&lt;h2&gt;Complete list&lt;/h2&gt;





































































































































































































































































































































































































































































































































































































&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Breed&lt;/th&gt;&lt;th&gt;Poodle Mix Name&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Airedale Terrier&lt;/td&gt;&lt;td&gt;Airedoodle&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Akita&lt;/td&gt;&lt;td&gt;Akitapoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Alaskan Malamute&lt;/td&gt;&lt;td&gt;Malamoodle&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;American Eskimo Dog&lt;/td&gt;&lt;td&gt;Eskidoodle&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;American Staffordshire Terrier&lt;/td&gt;&lt;td&gt;Staffypoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Australian Cattle Dog&lt;/td&gt;&lt;td&gt;Cattledoodle&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Australian Shepherd&lt;/td&gt;&lt;td&gt;Aussiedoodle&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Australian Terrier&lt;/td&gt;&lt;td&gt;Terripoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Ba-Shar&lt;/td&gt;&lt;td&gt;Basharpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Basset Hound&lt;/td&gt;&lt;td&gt;Bassetpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Beagle&lt;/td&gt;&lt;td&gt;Beagapoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Bearded Collie&lt;/td&gt;&lt;td&gt;Beardoodle&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Bedlington Terrier&lt;/td&gt;&lt;td&gt;Bedlington Terripoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Bernese Mountain Dog&lt;/td&gt;&lt;td&gt;Bernedoodle&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Bichon Frise&lt;/td&gt;&lt;td&gt;Bichpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Biewer Terrier&lt;/td&gt;&lt;td&gt;Biewerdoodle&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Black and Tan Coonhound&lt;/td&gt;&lt;td&gt;Coondoodle&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Bloodhound&lt;/td&gt;&lt;td&gt;Bloodhoundpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Bluetick Coonhound&lt;/td&gt;&lt;td&gt;Coondoodle&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Boerboel&lt;/td&gt;&lt;td&gt;Boerdoodle&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Border Collie&lt;/td&gt;&lt;td&gt;Bordoodle&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Border Terrier&lt;/td&gt;&lt;td&gt;Borderpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Borzoi&lt;/td&gt;&lt;td&gt;Borzoipoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Boston Terrier&lt;/td&gt;&lt;td&gt;Boston Terrierpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Bouvier des Flandres&lt;/td&gt;&lt;td&gt;Bouvipoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Boxer&lt;/td&gt;&lt;td&gt;Boxerdoodle&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Briard&lt;/td&gt;&lt;td&gt;Briardoodle&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Brittany&lt;/td&gt;&lt;td&gt;Brittanypoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Bull Terrier&lt;/td&gt;&lt;td&gt;Bull Terrierpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Bulldog&lt;/td&gt;&lt;td&gt;Bulldoodle&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Bullmastiff&lt;/td&gt;&lt;td&gt;Bullmastiffpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Cairn Terrier&lt;/td&gt;&lt;td&gt;Cairn Terrierpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Canaan Dog&lt;/td&gt;&lt;td&gt;Caananpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Cane Corso&lt;/td&gt;&lt;td&gt;Corsoodle&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Cardigan Welsh Corgi&lt;/td&gt;&lt;td&gt;Cardiganpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Cavalier King Charles Spaniel&lt;/td&gt;&lt;td&gt;Cavapoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Chesapeake Bay Retriever&lt;/td&gt;&lt;td&gt;Chessiepoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Chihuahua&lt;/td&gt;&lt;td&gt;Chihuahuadoodle&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Chinese Crested&lt;/td&gt;&lt;td&gt;Crestedoodle&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Chinese Shar-Pei&lt;/td&gt;&lt;td&gt;Shar-Poo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Chow Chow&lt;/td&gt;&lt;td&gt;Chowpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Clumber Spaniel&lt;/td&gt;&lt;td&gt;Clumberdoodle&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Cockapoo&lt;/td&gt;&lt;td&gt;Cockapoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Cocker Spaniel&lt;/td&gt;&lt;td&gt;Cockapoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Collie&lt;/td&gt;&lt;td&gt;Colliedoodle&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Coton de Tulear&lt;/td&gt;&lt;td&gt;Cotonpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Curly-Coated Retriever&lt;/td&gt;&lt;td&gt;Curly-Coated Retrieverpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Dachshund&lt;/td&gt;&lt;td&gt;Dachshundpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Dalmatian&lt;/td&gt;&lt;td&gt;Dalmadoodle&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Dandie Dinmont Terrier&lt;/td&gt;&lt;td&gt;Dandie Dinmont Terrierpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Doberman Pinscher&lt;/td&gt;&lt;td&gt;Doberdoodle&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Dogo Argentino&lt;/td&gt;&lt;td&gt;Dogodoodle&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Dogue de Bordeaux&lt;/td&gt;&lt;td&gt;Dogue de Bordeauxpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;English Cocker Spaniel&lt;/td&gt;&lt;td&gt;Cockapoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;English Setter&lt;/td&gt;&lt;td&gt;Setterpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;English Springer Spaniel&lt;/td&gt;&lt;td&gt;Springerdoodle&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;English Toy Spaniel&lt;/td&gt;&lt;td&gt;Toy Spanielpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Field Spaniel&lt;/td&gt;&lt;td&gt;Fielddoodle&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Finnish Lapphund&lt;/td&gt;&lt;td&gt;Lapphundpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Finnish Spitz&lt;/td&gt;&lt;td&gt;Spitzpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Flat-Coated Retriever&lt;/td&gt;&lt;td&gt;Flat-Coated Retrieverpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;French Bulldog&lt;/td&gt;&lt;td&gt;French Bulldoodle&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;German Pinscher&lt;/td&gt;&lt;td&gt;Pinscherpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;German Shepherd&lt;/td&gt;&lt;td&gt;Shepadoodle&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;German Shorthaired Pointer&lt;/td&gt;&lt;td&gt;GSPoodle&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;German Wirehaired Pointer&lt;/td&gt;&lt;td&gt;Wirehaired Pointing Griffonpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Giant Schnauzer&lt;/td&gt;&lt;td&gt;Giant Schnauzerdoodle&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Golden Retriever&lt;/td&gt;&lt;td&gt;Goldendoodle&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Gordon Setter&lt;/td&gt;&lt;td&gt;Gordondoodle&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Grand Basset Griffon Vendéen&lt;/td&gt;&lt;td&gt;Grand Basset Griffon Vendéendoodle&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Great Dane&lt;/td&gt;&lt;td&gt;Great Danedoodle&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Great Pyrenees&lt;/td&gt;&lt;td&gt;Great Pyredoodle&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Greater Swiss Mountain Dog&lt;/td&gt;&lt;td&gt;Greater Swiss Mountain Dogpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Greyhound&lt;/td&gt;&lt;td&gt;Greyhounddoodle&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Harrier&lt;/td&gt;&lt;td&gt;Harrington&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Havanese&lt;/td&gt;&lt;td&gt;Havapoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Ibizan Hound&lt;/td&gt;&lt;td&gt;Ibizan Griffon&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Irish Setter&lt;/td&gt;&lt;td&gt;Irish Doodle&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Irish Terrier&lt;/td&gt;&lt;td&gt;Terripoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Irish Water Spaniel&lt;/td&gt;&lt;td&gt;Irish Water Spanielpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Irish Wolfhound&lt;/td&gt;&lt;td&gt;Wolfhoundpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Italian Greyhound&lt;/td&gt;&lt;td&gt;Italian Greyhoundpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Jack Russell Terrier&lt;/td&gt;&lt;td&gt;Jack Russell Terrierpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Japanese Chin&lt;/td&gt;&lt;td&gt;Japooney&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Japanese Spitz&lt;/td&gt;&lt;td&gt;Spitzpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Kai Ken&lt;/td&gt;&lt;td&gt;Kaipoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Karelian Bear Dog&lt;/td&gt;&lt;td&gt;Karelianpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Kerry Blue Terrier&lt;/td&gt;&lt;td&gt;Kerry Blue Terrierpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Komondor&lt;/td&gt;&lt;td&gt;Komondorpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Kuvasz&lt;/td&gt;&lt;td&gt;Kuvaszpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Labrador Retriever&lt;/td&gt;&lt;td&gt;Labradoodle&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Lakeland Terrier&lt;/td&gt;&lt;td&gt;Lakelandpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Lhasa Apso&lt;/td&gt;&lt;td&gt;Lhasadoodle&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Maltese&lt;/td&gt;&lt;td&gt;Maltipoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Manchester Terrier&lt;/td&gt;&lt;td&gt;Manchester Terrierpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Miniature Bull Terrier&lt;/td&gt;&lt;td&gt;Mini Bull Terrierpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Miniature Pinscher&lt;/td&gt;&lt;td&gt;Minpinpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Miniature Schnauzer&lt;/td&gt;&lt;td&gt;Mini Schnauzerpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Neapolitan Mastiff&lt;/td&gt;&lt;td&gt;Neapolitan Mastiffpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Newfoundland&lt;/td&gt;&lt;td&gt;Newfoundlandpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Norwegian Buhund&lt;/td&gt;&lt;td&gt;Buhundpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Norwegian Elkhound&lt;/td&gt;&lt;td&gt;Elkhoundpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Norwich Terrier&lt;/td&gt;&lt;td&gt;Norwich Terrierpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Old English Sheepdog&lt;/td&gt;&lt;td&gt;Old English Sheepdogpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Papillon&lt;/td&gt;&lt;td&gt;Papipoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Pekingese&lt;/td&gt;&lt;td&gt;Pekingese Poodle&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Pembroke Welsh Corgi&lt;/td&gt;&lt;td&gt;Pembroke Welsh Corgipoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Pit Bull Terrier&lt;/td&gt;&lt;td&gt;Pittypoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Pointer&lt;/td&gt;&lt;td&gt;Pointpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Pomeranian&lt;/td&gt;&lt;td&gt;Pomapoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Poodle&lt;/td&gt;&lt;td&gt;Poo-poo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Portuguese Water Dog&lt;/td&gt;&lt;td&gt;Portuguese Water Dogpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Pug&lt;/td&gt;&lt;td&gt;PUGALIER&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Puli&lt;/td&gt;&lt;td&gt;Pulikpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Rhodesian Ridgeback&lt;/td&gt;&lt;td&gt;Rhodesian Ridgebackpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Rottweiler&lt;/td&gt;&lt;td&gt;Rottiepoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Saint Bernard&lt;/td&gt;&lt;td&gt;Bernedoodle&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Saluki&lt;/td&gt;&lt;td&gt;Salukipoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Samoyed&lt;/td&gt;&lt;td&gt;Samoyedpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Schipperke&lt;/td&gt;&lt;td&gt;Schipperkepoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Scottish Deerhound&lt;/td&gt;&lt;td&gt;Scottish Deerhoundpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Scottish Terrier&lt;/td&gt;&lt;td&gt;Scottiepoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Shetland Sheepdog&lt;/td&gt;&lt;td&gt;Sheltiepoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Shiba Inu&lt;/td&gt;&lt;td&gt;Shibapoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Shih Tzu&lt;/td&gt;&lt;td&gt;Shih Poo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Siberian Husky&lt;/td&gt;&lt;td&gt;Huskypoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Silky Terrier&lt;/td&gt;&lt;td&gt;Silky Terrierpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Skye Terrier&lt;/td&gt;&lt;td&gt;Skye Terrierpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Soft Coated Wheaten Terrier&lt;/td&gt;&lt;td&gt;Soft Coated Wheaten Terrierpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Staffordshire Bull Terrier&lt;/td&gt;&lt;td&gt;Staffordshire Bull Terrierpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Sussex Spaniel&lt;/td&gt;&lt;td&gt;Sussex Spanielpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Swedish Vallhund&lt;/td&gt;&lt;td&gt;Vallhundpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Tibetan Mastiff&lt;/td&gt;&lt;td&gt;Tibetan Mastiffpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Tibetan Spaniel&lt;/td&gt;&lt;td&gt;Tibepoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Tibetan Terrier&lt;/td&gt;&lt;td&gt;Tibbiepoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Toy Fox Terrier&lt;/td&gt;&lt;td&gt;Toy Fox Terrierpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Vizsla&lt;/td&gt;&lt;td&gt;Vizslapoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Weimaraner&lt;/td&gt;&lt;td&gt;Weimaranerpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Welsh Corgi&lt;/td&gt;&lt;td&gt;Corgipoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Welsh Terrier&lt;/td&gt;&lt;td&gt;Welsh Terrierpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;West Highland White Terrier&lt;/td&gt;&lt;td&gt;Westiepoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Whippet&lt;/td&gt;&lt;td&gt;Whippetpoo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Yorkshire Terrier&lt;/td&gt;&lt;td&gt;Yorkipoo&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>GPT-3 Chinese Language Tutor</title><link>https://briansunter.com/gpt3-chinese-language-tutor</link><guid isPermaLink="true">https://briansunter.com/gpt3-chinese-language-tutor</guid><description>Building a chatbot to learn Chinese internet slang and casual expressions.</description><pubDate>Sun, 03 Jul 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/chinese-robot_1672272679577_0.BwUcp8w7_Za2FjM.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;p&gt;I learned some Chinese in college, but only textbook basics like talking about school and weather. Colloquial Chinese and internet slang were always difficult for me.&lt;/p&gt;
&lt;p&gt;I wanted to see if GPT-3 could act as a specialized tutor for Chinese internet slang. Using &lt;a href=&quot;https://platform.openai.com/docs/guides/text-generation&quot;&gt;OpenAI’s conversational prompts&lt;/a&gt;, I created a tutoring chatbot.&lt;/p&gt;
&lt;p&gt;Below are my prompts (in code blocks) and the GPT-3 responses.&lt;/p&gt;
&lt;hr /&gt;
&lt;h2&gt;Talking to Chinese Twitter followers&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Prompt:&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;plaintext&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;This is a conversation between a student and chat bot that teaches mandarin Chinese to English speakers:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Teacher: hello, how can I answer your chinese questions?&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Student: Could you give me some phrases related to internet slang for talking to my twitter followers in Chinese?&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Teacher:&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Response:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;网络流行语短语：&lt;/p&gt;
&lt;p&gt;“你好哇” - “Hello there!”&lt;/p&gt;
&lt;p&gt;“嘿嘿” - “Hey!”&lt;/p&gt;
&lt;p&gt;“呀嘛” - “OMG!”&lt;/p&gt;
&lt;p&gt;“有啥事儿” - “What’s up?”&lt;/p&gt;
&lt;p&gt;“啥嘞” - “What’s up?”&lt;/p&gt;
&lt;p&gt;“哪儿” - “Where?”&lt;/p&gt;
&lt;p&gt;“怎么啦” - “What’s wrong?”&lt;/p&gt;
&lt;p&gt;“没啥” - “Nothing.”&lt;/p&gt;
&lt;p&gt;“不谢” - “You’re welcome.”&lt;/p&gt;
&lt;p&gt;“同意” - “I agree.”&lt;/p&gt;
&lt;p&gt;“反对” - “I disagree.”&lt;/p&gt;
&lt;p&gt;“赞” - “Like!”&lt;/p&gt;
&lt;p&gt;“踩” - “Dislike!”&lt;/p&gt;
&lt;p&gt;“顶” - “Support!”&lt;/p&gt;
&lt;p&gt;“没有办法” - “There’s no way!”&lt;/p&gt;
&lt;hr /&gt;
&lt;h2&gt;Chinese internet slang&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Prompt:&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;plaintext&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Student: What are some chinese internet slang phrases I should know?&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Teacher:&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Response:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Here are a few popular Chinese internet slang phrases to help you get started:&lt;/p&gt;
&lt;p&gt;喜欢 (xǐ huan) – to like&lt;/p&gt;
&lt;p&gt;好像 (hǎo xiàng) – to look like, to seem like&lt;/p&gt;
&lt;p&gt;跟 (gēn) – to follow&lt;/p&gt;
&lt;p&gt;推荐 (tuī jiàn) – to recommend&lt;/p&gt;
&lt;p&gt;帖子 (tiě zi) – a post&lt;/p&gt;
&lt;p&gt;回复 (huí fù) – to reply&lt;/p&gt;
&lt;p&gt;理所当然 (lǐsuǒdāngrán) - Of course&lt;/p&gt;
&lt;p&gt;没啥 (méi shā) - No big deal&lt;/p&gt;
&lt;p&gt;赶快 (gǎnkuài) - Hurry up&lt;/p&gt;
&lt;p&gt;屌丝 (diǎosī) - Loser&lt;/p&gt;
&lt;p&gt;小白 (xiǎobái) - Newbie&lt;/p&gt;
&lt;p&gt;扎心 (zhāxīn) - To be very upset&lt;/p&gt;
&lt;p&gt;高兴 (gāoxìng) - To be happy&lt;/p&gt;
&lt;p&gt;害羞 (hàixiū) - To be shy&lt;/p&gt;
&lt;p&gt;懒 (lǎn) - To be lazy&lt;/p&gt;
&lt;p&gt;伤心 (shāngxīn) - To be sad&lt;/p&gt;
&lt;p&gt;山寨 (shānzhài): This term is used to describe something that is a copy or imitation of something else. It can also be used to describe something that is of low quality.&lt;/p&gt;
&lt;p&gt;沙发 (shāfā): This term is used when someone agrees with what someone else has said. It is the equivalent of saying “I second that” or “+1”.&lt;/p&gt;
&lt;p&gt;草泥马 (cǎonímǎ): This term is used to describe someone who is lazy or inactive. It is the equivalent of saying “lazy bones” or “couch potato”.&lt;/p&gt;
&lt;p&gt;吃鸡 (chījī): This term is used to describe the act of winning in an online game. It is the equivalent of saying “gg” (good game) or “WP” (well played).&lt;/p&gt;
&lt;hr /&gt;
&lt;h2&gt;Chinese internet culture&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Prompt:&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;plaintext&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Student: What should I know about chinese internet culture?&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Teacher:&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Response:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;There are a few things to know about Chinese internet culture. The most popular social networking site in China is QQ, which has over 800 million active users. China also has the largest online population in the world, with over 650 million internet users.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Follow-up:&lt;/strong&gt; How many active users does Twitter have?&lt;/p&gt;
&lt;p&gt;Twitter has around 330 million active users.&lt;/p&gt;
&lt;hr /&gt;
&lt;h2&gt;Introducing yourself&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Prompt:&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;plaintext&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Student: How should I introduce myself in Chinese on the internet?&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Teacher:&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Response:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;你好，我叫______。我来自______，我喜欢______。&lt;/p&gt;
&lt;p&gt;Introducing yourself in Chinese on the internet is easy! Just start by saying 你好 (nǐ hǎo), which means “hello.” From there, you can tell people your name, where you’re from, and what you’re interested in. Don’t forget to include a few pleasantries to make sure your introduction goes over well!&lt;/p&gt;
&lt;hr /&gt;
&lt;h2&gt;AI vocabulary&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Prompt:&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;plaintext&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Student: What are some vocabulary and phrases I should know related to AI?&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Teacher:&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Response:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;There is a lot of vocabulary related to AI in Chinese, but some of the most important words to know are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;机器 (jī qì) - machine&lt;/li&gt;
&lt;li&gt;人工智能 (rén gōng zhì néng) - artificial intelligence&lt;/li&gt;
&lt;li&gt;自动化 (zì dòng huà) - automation&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Some useful phrases:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;我们使用机器来完成这项任务 (wǒ men shǐ yòng jī qì lái wán chéng zhè xiàng rèn wù) - we use machines to complete this task&lt;/li&gt;
&lt;li&gt;机器人将会取代人类工作 (jī qì rén jiāng huì qǔ dài rén lèi gōng zuò) - robots will replace human workers&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h2&gt;Colloquial expressions&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Prompt:&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;plaintext&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Student: Could you tell me some ways to talk with Chinese internet users in a colloquial way?&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Teacher:&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Response:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;There are a few ways to talk with Chinese internet users in a colloquial way. First, you can try using popular online slang. This includes words and phrases that are commonly used on the internet:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;耶 (yē) - yes&lt;/li&gt;
&lt;li&gt;哈哈 (hāhā) - haha&lt;/li&gt;
&lt;li&gt;嘻嘻 (xīxī) - hehe&lt;/li&gt;
&lt;li&gt;呵呵 (hēhē) - hehe&lt;/li&gt;
&lt;li&gt;哦 (ō) - oh&lt;/li&gt;
&lt;li&gt;哎呀 (āiyā) - oops&lt;/li&gt;
&lt;li&gt;啊 (a) - ah&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Another way to talk with Chinese internet users in a colloquial way is to use emoji and emoticons. These are small images or symbols that can be used to express emotions or ideas.&lt;/p&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Newsletter Issue 4</title><link>https://briansunter.com/newsletter/issue-4</link><guid isPermaLink="true">https://briansunter.com/newsletter/issue-4</guid><description>This newsletter is a deep dive on using the latest AI techniques for knowledge management and a tutorial on using Logseq for task management.</description><pubDate>Sun, 03 Jul 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/image_1662087305440_0.Cb56--Rg_Z2fmbTM.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;h2&gt;Summary and Reflection 🤔&lt;/h2&gt;
&lt;p&gt;This newsletter covers using the latest AI techniques for knowledge management and a tutorial on using Logseq for task management.&lt;/p&gt;
&lt;p&gt;We are living in an interesting time for AI right now. Several new techniques exist to search by “meaning” and “concepts” instead of just simple keywords. There are also new techniques for AI to generate new text and images instead of just analyzing them.&lt;/p&gt;
&lt;p&gt;I also include some articles about Yann LeCun, head of AI at Meta (Facebook), who has many interesting ideas about the future of AI. This week he put out a research roadmap on what he thinks is a potential path forward to human-level artificial intelligence.&lt;/p&gt;
&lt;h2&gt;Updates 🆕&lt;/h2&gt;
&lt;h3&gt;&lt;a href=&quot;https://briansunter.com/notetaking-with-ai&quot;&gt;notetaking-with-ai&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;See this guide to learn how you can use the latest AI techniques for personal knowledge management.&lt;/p&gt;
&lt;h2&gt;Productivity Toolkit 🛠️&lt;/h2&gt;
&lt;p&gt;In this section, I’ll share a productivity tip I’ve learned recently.&lt;/p&gt;
&lt;h3&gt;logseq-projects|Logseq Projects&lt;/h3&gt;
&lt;p&gt;In this guide, I write a basic tutorial on how to use Logseq for task management.&lt;/p&gt;
&lt;p&gt;Many people use Logseq primarily as a note-taking tool, but I extensively use its task management capabilities.&lt;/p&gt;
&lt;p&gt;The tasks determine what notes I write based on the projects I’m working on.&lt;/p&gt;
&lt;p&gt;One of the best ideas in Logseq is mixing your tasks throughout your pages and notes, then organizing and grouping them with queries.&lt;/p&gt;
&lt;h2&gt;Brain Food 🧠&lt;/h2&gt;
&lt;p&gt;In this section, I’ll share some interesting articles and “food for thought”&lt;/p&gt;
&lt;p&gt;Yann LeCun is the head of AI at Meta (Facebook) and one of the top AI researchers in the world.&lt;/p&gt;
&lt;h3&gt;Quote&lt;/h3&gt;
&lt;p&gt;LeCun believes that machines observing the world aren’t nearly enough for them to become intelligent. Real progress will happen when machines can take action in the real world and learn from the consequences of their actions, observing with the most high-fidelity inputs possible, like vision and sound.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What’s missing (from AI) is a principle that would allow our machine to learn how the world works by observation and by interaction with the world. A learning predictive world model is what we’re missing today, and in my opinion is the biggest obstacle to significant progress in AI.”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Link of the week&lt;/h3&gt;
&lt;p&gt;I highly recommend this article for hearing about his vision for the future of AI. &lt;a href=&quot;https://www.technologyreview.com/2022/06/24/1054817/yann-lecun-bold-new-vision-future-ai-deep-learning-meta/?utm_medium=tr_social&amp;amp;utm_campaign=site_visitor.unpaid.engagement&amp;amp;utm_source=Twitter&quot;&gt;A bold new vision for the future of AI&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;In 10 or 15 years people won’t be carrying smartphones in their pockets, but augmented-reality glasses fitted with virtual assistants that will guide humans through their day. “For those to be most useful to us, they basically have to have more or less human-level intelligence”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;His area of research is how to give machines “common sense” and create human-level artificial intelligence.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Common sense” is the catch-all term for this kind of intuitive reasoning. It includes a grasp of simple physics: for example, knowing that the world is three-dimensional and that objects don’t actually disappear when they go out of view. It lets us predict where a bouncing ball or a speeding bike will be in a few seconds’ time.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I think one of his most interesting ideas is “Grounded Intelligence”. He says that machines will never reach human-level intelligence by reading text alone and need much richer inputs from the real world.&lt;/p&gt;
&lt;p&gt;There isn’t a text in the world that explains mundane fundamentals, like when you hear a metallic crash in the kitchen, it probably came from a pan falling.&lt;/p&gt;
&lt;p&gt;His research area is focused on videos because many are on Facebook and Instagram, and the video format contains rich information about the world.&lt;/p&gt;
&lt;p&gt;He trains machines to predict what will happen next by watching video clips.&lt;/p&gt;
&lt;p&gt;He does this using a technique called “self-supervised learning,” meaning helping machines learn independently, without any human intervention or needing a human to teach them.&lt;/p&gt;
&lt;p&gt;A “self-supervised” training process for videos looks like this&lt;/p&gt;
&lt;p&gt;A machine will watch half a video&lt;/p&gt;
&lt;p&gt;Then, it will try to predict what will happen next in the video&lt;/p&gt;
&lt;p&gt;After making a prediction, it will watch the second half of the video to see if its prediction was correct.&lt;/p&gt;
&lt;p&gt;Then, it improves itself based on if the prediction was correct.&lt;/p&gt;
&lt;p&gt;They’re doing the same thing for voice. Why do you think your Google Home was only $25? Google’s AI is using your voice as training data. It’s listening to an audio snippet of what you say and seeing if it can predict what you’ll say next.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://support.google.com/assistant/answer/11140942?hl=en#zippy=%2Cconventional-learning&quot;&gt;Google Assistant - What technologies we use to train speech models&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;audio samples are collected and stored on Google’s servers.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;A portion of these audio samples are annotated by human reviewers.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;A training algorithm learns from annotated audio data samples.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;In these interviews, LeCun hints at the connection between AI and robotics: that machines will really start learning fast when they are out in the real world, autonomously experiencing it, making decisions, and learning from mistakes.&lt;/p&gt;
&lt;p&gt;This idea reminds me of the future in Westworld, where the robots are almost indistinguishable from human beings, then “awake” and become conscious while interacting with the humans in “high-fidelity” ways.&lt;/p&gt;
&lt;p&gt;&lt;video src=&quot;../../assets/videos/westworld-autoplay_1672142939444_0.mp4&quot; muted&gt;&lt;/video&gt;&lt;/p&gt;
&lt;p&gt;Take a look at these interviews and his new paper for more about Yann LeCun and his vision for the future of AI.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=SGSOCuByo24&quot;&gt;Yann LeCun Lex Friedman Podcast 1&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://youtu.be/SGzMElJ11Cc&quot;&gt;Yann LeCun Lex Friedman Podcast 2&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://openreview.net/forum?id=BZ5a1r-kVsf&quot;&gt;A Path Towards Autonomous Machine Intelligence&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Analytics 📈&lt;/h2&gt;
&lt;p&gt;I can’t believe the newsletter has already grown to over 100 subscribers!&lt;/p&gt;
&lt;p&gt;It’s doubling almost every week, going from 10 -&amp;gt; 30 -&amp;gt; 60 -&amp;gt; 120 -&amp;gt; ??&lt;/p&gt;
&lt;p&gt;That is already way more people than I was expecting. Knowing even a few people are looking at this motivates me to continue creating and posting high quality notes.&lt;/p&gt;
&lt;h2&gt;Outro&lt;/h2&gt;
&lt;p&gt;I hope you enjoyed this week’s newsletter.&lt;/p&gt;
&lt;p&gt;Next week, we’ll continue with more Logseq guides, like how to manage projects.&lt;/p&gt;
&lt;p&gt;I’ll also get started on my data structures and algorithms guide with an intro. In future issues, we’ll build up this guide on algorithms in great detail. Hopefully, this will help others learn algorithms and share my approach to note-taking.&lt;/p&gt;
&lt;p&gt;Check out the &lt;a href=&quot;https://briansunter.com/newsletter-roadmap&quot;&gt;newsletter-roadmap&lt;/a&gt; to see what I have in mind for future issues. Let me know on &lt;a href=&quot;https://twitter.com&quot;&gt;twitter @bsunter&lt;/a&gt;&lt;/p&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>How to Use GPT-3 to Learn Kubernetes</title><link>https://briansunter.com/how-to-use-gpt3-to-learn-kubernetes</link><guid isPermaLink="true">https://briansunter.com/how-to-use-gpt3-to-learn-kubernetes</guid><description>Using AI to generate study materials and explain complex Kubernetes concepts.</description><pubDate>Wed, 29 Jun 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/kubernetes_1672272543261_0.DAcqdSys_ZphSLg.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;p&gt;GPT-3 is a powerful learning tool. I’ve been meaning to learn Kubernetes in depth, so I used my &lt;a href=&quot;https://github.com/briansunter/logseq-plugin-gpt3-openai&quot;&gt;OpenAI GPT-3 Plugin&lt;/a&gt; to help generate study materials.&lt;/p&gt;
&lt;p&gt;My process: ask GPT-3 to create high-level overviews, then ask follow-up questions to get more details. Prompts (in bold) are followed by GPT-3’s responses.&lt;/p&gt;
&lt;p&gt;This guide assumes basic familiarity with GPT-3. &lt;a href=&quot;https://www.vox.com/future-perfect/21355768/gpt-3-ai-openai-turing-test-language&quot;&gt;Learn more about GPT-3 here&lt;/a&gt;.&lt;/p&gt;
&lt;hr /&gt;
&lt;h2&gt;OpenAI basics&lt;/h2&gt;
&lt;p&gt;From the &lt;a href=&quot;https://platform.openai.com/docs/guides/text-generation&quot;&gt;OpenAI docs&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Prompt:&lt;/strong&gt; What is an OpenAI completion?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Response:&lt;/strong&gt; An OpenAI completion is a machine learning model that is trained to predict the next word in a sentence. It’s like “autocomplete” for everything.&lt;/p&gt;
&lt;h3&gt;Prompt design tips&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;Our models can do everything from generating original stories to performing complex text analysis. Because they can do so many things, you have to be explicit in describing what you want. Showing, not just telling, is often the secret to a good prompt.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Show and tell:&lt;/strong&gt; Make it clear what you want through instructions, examples, or both. If you want the model to rank items alphabetically or classify sentiment, show it what you want.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Temperature settings:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Lower values: repeatable results with one right answer&lt;/li&gt;
&lt;li&gt;Higher values: more diverse, creative results&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Troubleshooting:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Is it clear what the intended generation should be?&lt;/li&gt;
&lt;li&gt;Are there enough examples?&lt;/li&gt;
&lt;li&gt;Did you check your examples for mistakes?&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Example: Text generation&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Prompt:&lt;/strong&gt; Brainstorm some ideas combining VR and fitness&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Response:&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;A VR fitness game that simulates obstacle courses to make working out more engaging&lt;/li&gt;
&lt;li&gt;A VR system used with real fitness equipment for immersive workouts&lt;/li&gt;
&lt;li&gt;A VR fitness app with customized workout programs based on goals and ability&lt;/li&gt;
&lt;li&gt;A VR fitness game where users compete in virtual races&lt;/li&gt;
&lt;li&gt;Virtual reality environments for group fitness classes from anywhere&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;a href=&quot;https://platform.openai.com/docs/guides/text-generation&quot;&gt;See the OpenAI docs for more&lt;/a&gt;.&lt;/p&gt;
&lt;hr /&gt;
&lt;h2&gt;Learning Kubernetes&lt;/h2&gt;
&lt;h3&gt;Overview&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Prompt:&lt;/strong&gt; Explain what Kubernetes software is&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Response:&lt;/strong&gt; Kubernetes is a system for managing containerized applications across a cluster of servers. It provides a platform for automating deployment, scaling, and operation of application containers.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Prompt:&lt;/strong&gt; What is a containerized software application in the context of Kubernetes?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Response:&lt;/strong&gt; Applications in Kubernetes are typically packaged as Docker images, which can be run in Kubernetes pods.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Prompt:&lt;/strong&gt; Why is Kubernetes important?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Response:&lt;/strong&gt; Kubernetes is important because it is a portable, extensible system for managing containerized workloads and services that facilitates both declarative configuration and automation. It has a wide range of features including container orchestration, service discovery and load balancing, storage provisioning, and secrets and configuration management.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Prompt:&lt;/strong&gt; What technologies are similar to Kubernetes?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Response:&lt;/strong&gt; Apache Mesos and Docker Swarm.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Prompt:&lt;/strong&gt; What are the top five most important things to know about Kubernetes?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Response:&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Kubernetes is a portable, extensible open-source platform for managing containerized workloads and services&lt;/li&gt;
&lt;li&gt;It has a large, rapidly growing ecosystem&lt;/li&gt;
&lt;li&gt;Kubernetes is hosted by the Cloud Native Computing Foundation (CNCF)&lt;/li&gt;
&lt;li&gt;It is a production-ready platform that is constantly evolving&lt;/li&gt;
&lt;li&gt;Kubernetes is open source and contributions are welcome&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Prompt:&lt;/strong&gt; What are the components that make up Kubernetes?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Response:&lt;/strong&gt; Pods, Replication Controllers, Services, Volumes, Secrets, Config Maps, Jobs, Daemon Sets, and Stateful Sets.&lt;/p&gt;
&lt;h3&gt;Understanding pods&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Prompt:&lt;/strong&gt; Explain Kubernetes pods to a programmer who is used to process-based containers&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Response:&lt;/strong&gt; In process-based containers, each container is isolated from the others and has its own process running inside it. This makes it easy to run multiple containers on a single host, as each container does not interfere with the others.&lt;/p&gt;
&lt;p&gt;Kubernetes pods are different in that they allow multiple containers to run together in a single pod. This means that the containers in a pod can share data and communicate with each other. This can be useful for microservices that need to communicate with each other.&lt;/p&gt;
&lt;hr /&gt;
&lt;h2&gt;Advanced Kubernetes guide&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Prompt:&lt;/strong&gt; Write advanced guide to Kubernetes&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Response:&lt;/strong&gt; This guide covers:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Kubernetes Basics&lt;/strong&gt;: Introduction to the toolset&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Kubernetes Services&lt;/strong&gt;: Exposing applications to the outside world&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Kubernetes Storage&lt;/strong&gt;: Persisting data with Storage Classes and Volumes&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Kubernetes Networking&lt;/strong&gt;: Connecting your applications&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Kubernetes Security&lt;/strong&gt;: Best practices for securing clusters&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Kubernetes Monitoring&lt;/strong&gt;: Recommendations for monitoring&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Kubernetes Maintenance&lt;/strong&gt;: Upgrading versions and backing up data&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Kubernetes architecture&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Prompt:&lt;/strong&gt; Write guide to Kubernetes Basics&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Response:&lt;/strong&gt; Kubernetes is composed of these main modules:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;kube-apiserver&lt;/strong&gt;: REST API for Kubernetes, front-end for the control plane&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;kube-controller-manager&lt;/strong&gt;: Runs the replication, endpoint, namespace, and service account controllers&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;kube-scheduler&lt;/strong&gt;: Automatically schedules containers on nodes&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;kube-proxy&lt;/strong&gt;: Provides network proxy services&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;etcd&lt;/strong&gt;: Stores persistent cluster state&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Supporting modules:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;cAdvisor&lt;/strong&gt;: Collects container performance data&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;kubelet&lt;/strong&gt;: Runs containers on nodes&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;kube-dns&lt;/strong&gt;: Provides DNS services&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Deployment patterns&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Deployments:&lt;/strong&gt; Define replicas of your application. Kubernetes deploys across specified replicas and automatically updates when you change settings.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Jobs:&lt;/strong&gt; Define tasks to run once. Create a Job resource, Kubernetes runs it, then deletes the resource. Use CronJob for scheduled jobs.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;DaemonSets:&lt;/strong&gt; Deploy applications that need to run on every node (useful for monitoring or logging).&lt;/p&gt;
&lt;h3&gt;Kubernetes Services&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Prompt:&lt;/strong&gt; Write advanced guide to Kubernetes Services&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Response:&lt;/strong&gt; Services expose your applications to the outside world. When a Service is created, Kubernetes automatically creates a DNS entry for it.&lt;/p&gt;
&lt;p&gt;Create a Service:&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;bash&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;kubectl&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; create&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; -f&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; service.yaml&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;View Service info:&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;bash&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;kubectl&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; get&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; service&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; my-service&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;kubectl&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; describe&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; service&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; my-service&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Quick expose without a definition file:&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;bash&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;kubectl&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; expose&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; deployment&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; my-app&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; --port=80&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3&gt;Kubernetes Networking&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Prompt:&lt;/strong&gt; Write advanced guide to Kubernetes Networking&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Response:&lt;/strong&gt; Kubernetes networking is based on the Container Network Interface (CNI). Key services:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;IP address management&lt;/strong&gt;: Allocate IPs for containers from a single pool&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;DNS service&lt;/strong&gt;: Resolve hostnames to IP addresses for service discovery&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Load balancing&lt;/strong&gt;: Distribute traffic using round-robin or least-connected&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Connecting applications:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Service objects&lt;/strong&gt;: Expose pods as a network service via DNS name or IP&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Ingress objects&lt;/strong&gt;: Route external traffic, provide SSL termination&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Network policies&lt;/strong&gt;: Control which pods can communicate (like firewalls)&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Kubernetes Security&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Prompt:&lt;/strong&gt; Write advanced guide to Kubernetes Security&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Response:&lt;/strong&gt; Best practices for securing your cluster:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Role-Based Access Control (RBAC)&lt;/strong&gt;: Control who accesses what resources using roles, subjects, and resources&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Network Segmentation&lt;/strong&gt;: Isolate application traffic from database traffic to limit attack damage&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;TLS/SSL&lt;/strong&gt;: Encrypt communication between cluster components&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Firewalls&lt;/strong&gt;: Control access based on IP addresses and ports&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Identity and Access Management (IAM)&lt;/strong&gt;: Control who can access the API server&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Security Policies&lt;/strong&gt;: Define allowed and disallowed actions&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Security Groups&lt;/strong&gt;: Allow/deny traffic from specific IPs or subnets&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;VPN&lt;/strong&gt;: Secure communication between cluster and external clients&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;Kubernetes Monitoring&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Prompt:&lt;/strong&gt; Write guide to Kubernetes Monitoring&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Response:&lt;/strong&gt; Recommendations:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Use Prometheus&lt;/strong&gt;: Open-source monitoring designed for Kubernetes, scrapes metrics from API objects, auto-discovers pods&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Collect component metrics&lt;/strong&gt;: Monitor API server, scheduler, kubelet to understand cluster health&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Collect application metrics&lt;/strong&gt;: Monitor your apps to troubleshoot issues&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Use Grafana&lt;/strong&gt;: Visualize Prometheus metrics with Kubernetes-specific dashboards&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Set up alerts&lt;/strong&gt;: Use Alertmanager to notify via email, Slack, or PagerDuty&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h2&gt;Practical tutorials&lt;/h2&gt;
&lt;h3&gt;Pod YAML example&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Prompt:&lt;/strong&gt; Write example of Kubernetes pod YAML files&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Response:&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;yaml&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;apiVersion&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;v1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;kind&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;Pod&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;metadata&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;  name&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;mypod&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;  labels&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;    app&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;myapp&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;spec&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;  containers&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    - &lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;mycontainer&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;      image&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;busybox&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;      command&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: [&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;echo&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;hello world&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;]&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3&gt;Deploy Node.js on Kubernetes&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Prompt:&lt;/strong&gt; Write tutorial on how to deploy Node.js application on Kubernetes&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Response:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Prerequisites: Minikube, kubectl, Docker&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Create &lt;code&gt;app.js&lt;/code&gt;:&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;javascript&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;console.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;log&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;Hello, world!&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;Create &lt;code&gt;Dockerfile&lt;/code&gt;:&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;dockerfile&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;FROM&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; node:10&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;WORKDIR&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; /app&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;COPY&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; app.js .&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;CMD&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; [&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;node&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;app.js&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;]&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;Build and deploy:&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;bash&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;docker&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; build&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; -t&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; my-node-app&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; .&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;minikube&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; start&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;kubectl&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; run&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; my-node-app&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; --image=my-node-app&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; --image-pull-policy=Never&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;kubectl&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; expose&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; pod&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; my-node-app&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; --type=NodePort&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;kubectl&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; describe&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; service&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; my-node-app&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; |&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; grep&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; NodePort&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;Access at &lt;code&gt;http://&amp;lt;Minikube IP&amp;gt;:&amp;lt;NodePort&amp;gt;&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;Production hosting&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Prompt:&lt;/strong&gt; How should I host Kubernetes in production?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Response:&lt;/strong&gt; Options include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Managed services&lt;/strong&gt;: Google Kubernetes Engine (GKE), Amazon EKS, Azure AKS&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;On-premise&lt;/strong&gt;: Install using Kubeadm&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Setting up Kubernetes on AWS&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Prompt:&lt;/strong&gt; Write tutorial on how to set up Kubernetes on AWS&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Response:&lt;/strong&gt; Steps to set up a cluster on AWS:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Create an AWS VPC with CIDR block &lt;code&gt;10.0.0.0/16&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Create a subnet with CIDR block &lt;code&gt;10.0.0.0/24&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Create a route table with route &lt;code&gt;0.0.0.0/0&lt;/code&gt; to Internet Gateway&lt;/li&gt;
&lt;li&gt;Create a security group allowing SSH and Kubernetes traffic&lt;/li&gt;
&lt;li&gt;Launch EC2 instances&lt;/li&gt;
&lt;li&gt;Configure DNS and generate SSL certificates&lt;/li&gt;
&lt;li&gt;Deploy Kubernetes components&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;EKS CloudFormation example&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Prompt:&lt;/strong&gt; Write CloudFormation YAML file to set up AWS managed Kubernetes EKS cluster&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Response:&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;yaml&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;Resources&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;  EksCluster&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;    Type&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;AWS::EKS::Cluster&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;    Properties&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;      Name&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;eks-cluster&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;      RoleArn&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;!GetAtt&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; EksServiceRole.Arn&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;      Version&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;1.15&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;      VpcConfig&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;        SubnetIds&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;          - &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;!Ref&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; PrivateSubnet1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;          - &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;!Ref&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; PrivateSubnet2&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;        SecurityGroupIds&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;          - &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;!Ref&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; EksSecurityGroup&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3&gt;Config files&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Prompt:&lt;/strong&gt; What config files are required to setup Kubernetes?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Response:&lt;/strong&gt; Kubernetes config files are written in YAML or JSON and define:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Objects&lt;/strong&gt;: Pods, services, deployments, replica sets&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Parameters&lt;/strong&gt;: CPU/memory limits, network settings, security policies&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;See the &lt;a href=&quot;https://kubernetes.io/docs/concepts/overview/components/#configuration&quot;&gt;Kubernetes documentation&lt;/a&gt; for details.&lt;/p&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Newsletter Issue 3</title><link>https://briansunter.com/newsletter/issue-3</link><guid isPermaLink="true">https://briansunter.com/newsletter/issue-3</guid><description>This week, I wrote a few guides. I released a new plugin to download captions from YouTube directly into your notes to help you study videos. I also include some productivity tips and fun artwork created by OpenAI’s DALL-E image generation technology.</description><pubDate>Sun, 26 Jun 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/get-youtube-captions_1672134947975_0.DKNkakNQ_1hP0FR.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;h2&gt;Summary and Reflection 🤔&lt;/h2&gt;
&lt;p&gt;This week I wrote a few &lt;a href=&quot;https://briansunter.com/graph/&quot;&gt;guides&lt;/a&gt;. I released a &lt;a href=&quot;https://github.com/briansunter/logseq-get-youtube-captions&quot;&gt;new plugin&lt;/a&gt; to download captions from YouTube directly into your notes to help you study videos. I also include some productivity tips and fun artwork created by OpenAI’s DALL-E image generation technology.&lt;/p&gt;
&lt;h2&gt;Updates 🆕&lt;/h2&gt;
&lt;h3&gt;get-youtube-subtitles&lt;/h3&gt;
&lt;p&gt;My &lt;a href=&quot;https://github.com/briansunter/logseq-get-youtube-captions&quot;&gt;get-youtube-captions plugin&lt;/a&gt; launched in the Logseq marketplace. This tool can pull the captions from a YouTube video into your notes. Just search for “get-youtube-captions” in the Logseq marketplace to install it.&lt;/p&gt;
&lt;p&gt;There is a lot of good content on YouTube, but I need help remembering. This plugin helps you study videos and works well for podcasts on YouTube.&lt;/p&gt;
&lt;p&gt;The plugin inserts all spoken words from the video as text directly underneath the video link in your notes.&lt;/p&gt;

  &lt;div class=&quot;not-prose tweet-embed&quot;&gt;
    &lt;div class=&quot;tweet-card&quot;&gt;
      &lt;a href=&quot;https://twitter.com/Bsunter/status/1537107686973616128&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;&lt;/a&gt;
      &lt;div class=&quot;tweet-header&quot;&gt;
        &lt;div class=&quot;tweet-author&quot;&gt;
          &lt;img src=&quot;https://pbs.twimg.com/profile_images/507230915458646016/POGcr0En_normal.jpeg&quot; alt=&quot;Brian Sunter&apos;s avatar&quot; /&gt;
          &lt;div class=&quot;tweet-author-info&quot;&gt;
            &lt;a href=&quot;https://twitter.com/Bsunter/status/1537107686973616128&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
              &lt;div class=&quot;tweet-author-name-row&quot;&gt;
                &lt;span class=&quot;tweet-author-name&quot;&gt;Brian Sunter&lt;/span&gt;
                

  


              &lt;/div&gt;
            &lt;/a&gt;
            &lt;span class=&quot;tweet-author-handle&quot;&gt;@Bsunter&lt;/span&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;a href=&quot;https://twitter.com/Bsunter/status/1537107686973616128&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;

  
    
  

&lt;/a&gt;
      &lt;/div&gt;
      
      &lt;div class=&quot;tweet-body&quot;&gt;My newsest &lt;a href=&quot;https://twitter.com/logseq&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;@logseq&lt;/a&gt; plugin just launched in the marketplace! 

logseq-get-youtube-captions

If you have a youtube embed or link, this will download the captions for the video. 

Makes studying youtube videos much easier. 

Try it out in the marketplace!

&lt;a href=&quot;https://github.com/briansunter/logseq-get-youtube-captions&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;github.com/briansunter/lo…&lt;/a&gt; https://t.co/vxAEeK1iHV&lt;/div&gt;
      Show more
      
    &lt;div class=&quot;tweet-gif-container&quot;&gt;
      &lt;video muted preload=&quot;auto&quot;&gt;
        &lt;source src=&quot;https://video.twimg.com/tweet_video/FVTnRKwVEAAvd8z.mp4&quot; type=&quot;video/mp4&quot;&gt;&lt;/source&gt;
      &lt;/video&gt;
      &lt;span class=&quot;tweet-gif-badge&quot;&gt;GIF&lt;/span&gt;
    &lt;/div&gt;
      &lt;a href=&quot;https://twitter.com/Bsunter/status/1537107686973616128&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
        &lt;span class=&quot;tweet-timestamp&quot;&gt;Jun 15, 2022, 4:20 PM&lt;/span&gt;
      &lt;/a&gt;
      &lt;hr /&gt;
      &lt;div class=&quot;tweet-actions&quot;&gt;
        &lt;div class=&quot;tweet-action tweet-action-like&quot;&gt;
          

  
    
  


          &lt;span&gt;60&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class=&quot;tweet-action tweet-action-reply&quot;&gt;
          

  
    
  


          &lt;span&gt;5&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  
&lt;p&gt;Feeding the captions text into my ai-powered-notetaking-with-the-gpt-3-logseq-plugin|Logseq Openai plugin works incredibly well to summarize the video and clean up the wording of the captions. I use it to get a video summary before watching it too.&lt;/p&gt;

  &lt;div class=&quot;not-prose tweet-embed&quot;&gt;
    &lt;div class=&quot;tweet-card&quot;&gt;
      &lt;a href=&quot;https://twitter.com/Bsunter/status/1537115206412664833&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;&lt;/a&gt;
      &lt;div class=&quot;tweet-header&quot;&gt;
        &lt;div class=&quot;tweet-author&quot;&gt;
          &lt;img src=&quot;https://pbs.twimg.com/profile_images/507230915458646016/POGcr0En_normal.jpeg&quot; alt=&quot;Brian Sunter&apos;s avatar&quot; /&gt;
          &lt;div class=&quot;tweet-author-info&quot;&gt;
            &lt;a href=&quot;https://twitter.com/Bsunter/status/1537115206412664833&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
              &lt;div class=&quot;tweet-author-name-row&quot;&gt;
                &lt;span class=&quot;tweet-author-name&quot;&gt;Brian Sunter&lt;/span&gt;
                

  


              &lt;/div&gt;
            &lt;/a&gt;
            &lt;span class=&quot;tweet-author-handle&quot;&gt;@Bsunter&lt;/span&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;a href=&quot;https://twitter.com/Bsunter/status/1537115206412664833&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;

  
    
  

&lt;/a&gt;
      &lt;/div&gt;
      
      &lt;div class=&quot;tweet-body&quot;&gt;&lt;a href=&quot;https://twitter.com/logseq&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;@logseq&lt;/a&gt; Works amazingly well with my gpt3 openai plugin to analyze the captions. 

It can make a top 5 points for a 20 minute video, to help you remember it or decide ahead of time if you should watch it. 

This is TLDR for videos!

&lt;a href=&quot;https://github.com/briansunter/logseq-plugin-gpt3-openai&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;github.com/briansunter/lo…&lt;/a&gt; https://t.co/dHtDWiac5W&lt;/div&gt;
      
      
    &lt;div class=&quot;tweet-media&quot;&gt;
      &lt;img src=&quot;https://pbs.twimg.com/media/FVTuGm_VUAAEUtt.jpg&quot; alt=&quot;Tweet media&quot; loading=&quot;lazy&quot; /&gt;
    &lt;/div&gt;
      &lt;a href=&quot;https://twitter.com/Bsunter/status/1537115206412664833&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
        &lt;span class=&quot;tweet-timestamp&quot;&gt;Jun 15, 2022, 4:49 PM&lt;/span&gt;
      &lt;/a&gt;
      &lt;hr /&gt;
      &lt;div class=&quot;tweet-actions&quot;&gt;
        &lt;div class=&quot;tweet-action tweet-action-like&quot;&gt;
          

  
    
  


          &lt;span&gt;26&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class=&quot;tweet-action tweet-action-reply&quot;&gt;
          

  
    
  


          &lt;span&gt;4&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  

  &lt;div class=&quot;not-prose tweet-embed&quot;&gt;
    &lt;div class=&quot;tweet-card&quot;&gt;
      &lt;a href=&quot;https://twitter.com/Bsunter/status/1537117777038757889&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;&lt;/a&gt;
      &lt;div class=&quot;tweet-header&quot;&gt;
        &lt;div class=&quot;tweet-author&quot;&gt;
          &lt;img src=&quot;https://pbs.twimg.com/profile_images/507230915458646016/POGcr0En_normal.jpeg&quot; alt=&quot;Brian Sunter&apos;s avatar&quot; /&gt;
          &lt;div class=&quot;tweet-author-info&quot;&gt;
            &lt;a href=&quot;https://twitter.com/Bsunter/status/1537117777038757889&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
              &lt;div class=&quot;tweet-author-name-row&quot;&gt;
                &lt;span class=&quot;tweet-author-name&quot;&gt;Brian Sunter&lt;/span&gt;
                

  


              &lt;/div&gt;
            &lt;/a&gt;
            &lt;span class=&quot;tweet-author-handle&quot;&gt;@Bsunter&lt;/span&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;a href=&quot;https://twitter.com/Bsunter/status/1537117777038757889&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;

  
    
  

&lt;/a&gt;
      &lt;/div&gt;
      
      &lt;div class=&quot;tweet-body&quot;&gt;&lt;a href=&quot;https://twitter.com/logseq&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;@logseq&lt;/a&gt; You can pick which language to get the subtitles in too https://t.co/4Eyz4wwLWp&lt;/div&gt;
      
      
    &lt;div class=&quot;tweet-gif-container&quot;&gt;
      &lt;video muted preload=&quot;auto&quot;&gt;
        &lt;source src=&quot;https://video.twimg.com/tweet_video/FVTwbH0VEAAmMZM.mp4&quot; type=&quot;video/mp4&quot;&gt;&lt;/source&gt;
      &lt;/video&gt;
      &lt;span class=&quot;tweet-gif-badge&quot;&gt;GIF&lt;/span&gt;
    &lt;/div&gt;
      &lt;a href=&quot;https://twitter.com/Bsunter/status/1537117777038757889&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
        &lt;span class=&quot;tweet-timestamp&quot;&gt;Jun 15, 2022, 5:00 PM&lt;/span&gt;
      &lt;/a&gt;
      &lt;hr /&gt;
      &lt;div class=&quot;tweet-actions&quot;&gt;
        &lt;div class=&quot;tweet-action tweet-action-like&quot;&gt;
          

  
    
  


          &lt;span&gt;4&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class=&quot;tweet-action tweet-action-reply&quot;&gt;
          

  
    
  


          &lt;span&gt;0&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  
&lt;h3&gt;&lt;a href=&quot;https://briansunter.com/omnivore-logseq-guide&quot;&gt;omnivore-logseq-guide&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;If you read a lot of content online, you need a “read it later app” to save interesting links, then read and highlight everything all at once. Keeping the article for later is much more efficient than reading a link as soon as you find it.&lt;/p&gt;
&lt;p&gt;I recently discovered a terrific “Read it Later” app with a built-in Reader Mode and highlighter called &lt;a href=&quot;https://omnivore.app&quot;&gt;Omnivore&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&quot;https://github.com/omnivore-app/logseq-omnivore&quot;&gt;Omnivore web app and backend are open-source&lt;/a&gt;, so you know you can use it free forever, just like Logseq. Omnivore provides a free hosted option too.&lt;/p&gt;
&lt;p&gt;This is a screenshot in the Omnivore reader view with my highlights:&lt;/p&gt;

  &lt;div class=&quot;not-prose tweet-embed&quot;&gt;
    &lt;div class=&quot;tweet-card&quot;&gt;
      &lt;a href=&quot;https://twitter.com/Bsunter/status/1539118080944656386&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;&lt;/a&gt;
      &lt;div class=&quot;tweet-header&quot;&gt;
        &lt;div class=&quot;tweet-author&quot;&gt;
          &lt;img src=&quot;https://pbs.twimg.com/profile_images/507230915458646016/POGcr0En_normal.jpeg&quot; alt=&quot;Brian Sunter&apos;s avatar&quot; /&gt;
          &lt;div class=&quot;tweet-author-info&quot;&gt;
            &lt;a href=&quot;https://twitter.com/Bsunter/status/1539118080944656386&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
              &lt;div class=&quot;tweet-author-name-row&quot;&gt;
                &lt;span class=&quot;tweet-author-name&quot;&gt;Brian Sunter&lt;/span&gt;
                

  


              &lt;/div&gt;
            &lt;/a&gt;
            &lt;span class=&quot;tweet-author-handle&quot;&gt;@Bsunter&lt;/span&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;a href=&quot;https://twitter.com/Bsunter/status/1539118080944656386&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;

  
    
  

&lt;/a&gt;
      &lt;/div&gt;
      
      &lt;div class=&quot;tweet-body&quot;&gt;I just wrote a guide on how to use the &lt;a href=&quot;https://twitter.com/omnivoreapp&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;@omnivoreapp&lt;/a&gt; read it later app with &lt;a href=&quot;https://twitter.com/logseq&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;@logseq&lt;/a&gt; 

Omnivore is an awesome open source &quot;read it later&quot; app with a chrome extension, ios app, api, and logseq plugin. You can save/highlight links and they appear in logseq.

&lt;a href=&quot;https://briansunter.com/graph/#/page/omnivore-logseq-guide&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;briansunter.com/graph/#/page/o…&lt;/a&gt; https://t.co/1R2H31PngW&lt;/div&gt;
      
      
    &lt;div class=&quot;tweet-media&quot;&gt;
      &lt;img src=&quot;https://pbs.twimg.com/media/FVwLos8X0AAIB3P.jpg&quot; alt=&quot;Tweet media&quot; loading=&quot;lazy&quot; /&gt;
    &lt;/div&gt;
      &lt;a href=&quot;https://twitter.com/Bsunter/status/1539118080944656386&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
        &lt;span class=&quot;tweet-timestamp&quot;&gt;Jun 21, 2022, 5:28 AM&lt;/span&gt;
      &lt;/a&gt;
      &lt;hr /&gt;
      &lt;div class=&quot;tweet-actions&quot;&gt;
        &lt;div class=&quot;tweet-action tweet-action-like&quot;&gt;
          

  
    
  


          &lt;span&gt;78&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class=&quot;tweet-action tweet-action-reply&quot;&gt;
          

  
    
  


          &lt;span&gt;7&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  
&lt;p&gt;The highlighter in reader mode is essential.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;image&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1284px) 1284px, 100vw&quot; width=&quot;1284&quot; height=&quot;2778&quot; src=&quot;https://briansunter.com/_astro/image_1662086941972_0.EtwcTpG9_1cqCBu.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1662086941972_0.EtwcTpG9_ZhgHME.webp 640w, https://briansunter.com/_astro/image_1662086941972_0.EtwcTpG9_1NVVpI.webp 750w, https://briansunter.com/_astro/image_1662086941972_0.EtwcTpG9_ZVkKM4.webp 828w, https://briansunter.com/_astro/image_1662086941972_0.EtwcTpG9_27a8rv.webp 1080w, https://briansunter.com/_astro/image_1662086941972_0.EtwcTpG9_gDzlf.webp 1280w, https://briansunter.com/_astro/image_1662086941972_0.EtwcTpG9_1cqCBu.webp 1284w&quot; /&gt;&lt;figcaption&gt;image&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h3&gt;logseq-social&lt;/h3&gt;
&lt;p&gt;Logseq social was a quick idea I had one night when setting up the about me page on my public graph.&lt;/p&gt;
&lt;p&gt;I wanted to make it easier for users to learn about me and showcase other cool graphs on my profile. I also wanted to discover new ones through others’ profiles. I want to create a modern “link ring-3” or “blog roll.”&lt;/p&gt;
&lt;p&gt;My thought process went like this:&lt;/p&gt;
&lt;p&gt;I need to set up an about me page for my public graph, so people know who I am&lt;/p&gt;
&lt;p&gt;Instead of choosing a random page name, I make a page at a known location in my graph called &lt;code&gt;[[logseq-social/profile]]&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Instead of just writing plain text, I use logseq properties to add a little bit of structure. This means I add properties like&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;plaintext&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This allows me to have a nice about me profile page and display a list of interesting graphs for others to explore. It also helps my graph get discovered by making my profile easily shareable by others on their profiles.&lt;/p&gt;
&lt;p&gt;In the future, it would be cool to search others’ graphs and have a plugin to make the social features easier. Lots of interesting features could be built on this simple idea.&lt;/p&gt;
&lt;p&gt;I’m excited by the people who set this up already!
{{ tweet 1539677453076922368 }}&lt;/p&gt;
&lt;h3&gt;&lt;a href=&quot;https://briansunter.com/logseq-getting-started&quot;&gt;logseq-getting-started&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Logseq is still in beta, so there aren’t many “getting started” guides, especially for nontechnical users.&lt;/p&gt;
&lt;p&gt;I logseq-getting-started|wrote a quick guide on how you can get started with logseq and share your notes online in just 30 minutes.&lt;/p&gt;
&lt;p&gt;I go over the bare minimum to install logseq and make a public website like mine with a hosting company called Netlify. This will help anyone reading this newsletter who hasn’t tried logseq yet or wants to follow along with some of my note taking.&lt;/p&gt;
&lt;p&gt;All you need to do is download logseq from github and upload your site to Netlify. logseq-getting-started|I go over it in detail in this guide. I highly recommend buying your own domain to go along with it.&lt;/p&gt;
&lt;h2&gt;Productivity Toolkit 🛠️&lt;/h2&gt;
&lt;p&gt;I highly recommend &lt;a href=&quot;https://www.amazon.com/Building-Second-Brain-Organize-Potential-ebook/dp/B09LVVN9L3&quot;&gt;Tiago Forte’s book Building a Second Brain&lt;/a&gt; as an introduction to the whole note-taking and “second brain” movement.&lt;/p&gt;
&lt;p&gt;It’s notable because it’s both a productivity book and a book on personal knowledge management. It shows how you can organize your knowledge to do/produce valuable things. I read so much stuff and forget it; the stuff I read doesn’t always lead to a beneficial outcome in my life.&lt;/p&gt;
&lt;p&gt;This book expresses a lot of my favorite ideas from my favorite books like &lt;a href=&quot;https://www.amazon.com/Getting-Things-Done-Stress-Free-Productivity/dp/0142000280/&quot;&gt;Getting Things Done&lt;/a&gt;, &lt;a href=&quot;https://www.amazon.com/How-Take-Smart-Notes-Nonfiction/dp/B09HSSFCPR&quot;&gt;How to Take Smart Notes&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;He explains these abstract “workflows for your life” in a tool-agnostic way with good terminology.&lt;/p&gt;
&lt;p&gt;The main workflow is a four-step process called &lt;a href=&quot;https://web.archive.org/web/20230504113619/https://www.keepproductive.com/blog/how-to-build-a-second-brain&quot;&gt;CODE&lt;/a&gt; which he goes over in detail in his book.&lt;/p&gt;
&lt;p&gt;*C**- Capture&lt;/p&gt;
&lt;p&gt;*O**- Organize&lt;/p&gt;
&lt;p&gt;*D**- Distill&lt;/p&gt;
&lt;p&gt;*E**- Express&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=K-ssUVyfn5g&quot;&gt;Check out this video for an excellent summary&lt;/a&gt;&lt;/p&gt;
&lt;iframe width=&quot;100%&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/K-ssUVyfn5g&quot; frameborder=&quot;0&quot; loading=&quot;lazy&quot; allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen&gt;&lt;/iframe&gt;
&lt;h2&gt;Brain Food 🧠&lt;/h2&gt;
&lt;h3&gt;Quote&lt;/h3&gt;
&lt;p&gt;When starting notetaking, the biggest question is how to organize your notes and what to turn into backlinks.&lt;/p&gt;
&lt;p&gt;This is a quote from one of my favorite books &lt;a href=&quot;https://www.amazon.com/How-Take-Smart-Notes-Nonfiction/dp/B09HSSFCPR&quot;&gt;How to Take Smart Notes&lt;/a&gt; by Dr. Sönke Ahrens&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The archivist asks which keyword is the most fitting. The writer asks under which circumstances will I want to stumble upon this note again, even if I forget it?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Are you a writer or just an archivist?&lt;/p&gt;
&lt;p&gt;When taking notes, we should always think in the back of our minds about how we’ll use the note in the future. In particular, what situation or context will we be in where we need the note?&lt;/p&gt;
&lt;p&gt;When making a backlink, think more about how you’ll use the note and how the new note relates to your existing notes than trying to “categorize” the note perfectly.&lt;/p&gt;
&lt;h3&gt;Link of the week&lt;/h3&gt;
&lt;p&gt;Have you seen &lt;a href=&quot;https://openai.com/blog/dall-e/&quot;&gt;DALL-E&lt;/a&gt; by OpenAI? It’s an AI that can create an image of anything you ask and generate a completely original picture. It’s a website with a text box. You type the scene you want to see in the box, and the AI generates an image. The same company makes it as gpt3.&lt;/p&gt;
&lt;p&gt;Only a few people have access, but it will be more widely available soon.&lt;/p&gt;
&lt;p&gt;Soon, you will see stuff like DALL-E and GPT-3 everywhere. All entertainment content will use some level of AI generation soon.&lt;/p&gt;
&lt;p&gt;One of the potentials for the “multiverse” is to generate tons and tons of content like this using AI.&lt;/p&gt;

  &lt;div class=&quot;not-prose tweet-embed&quot;&gt;
    &lt;div class=&quot;tweet-card&quot;&gt;
      &lt;a href=&quot;https://twitter.com/Znegil/status/1539715979713847298&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;&lt;/a&gt;
      &lt;div class=&quot;tweet-header&quot;&gt;
        &lt;div class=&quot;tweet-author&quot;&gt;
          &lt;img src=&quot;https://pbs.twimg.com/profile_images/1967543334206910464/ssJvvWJl_normal.jpg&quot; alt=&quot;Znegil&apos;s avatar&quot; /&gt;
          &lt;div class=&quot;tweet-author-info&quot;&gt;
            &lt;a href=&quot;https://twitter.com/Znegil/status/1539715979713847298&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
              &lt;div class=&quot;tweet-author-name-row&quot;&gt;
                &lt;span class=&quot;tweet-author-name&quot;&gt;Znegil&lt;/span&gt;
                
              &lt;/div&gt;
            &lt;/a&gt;
            &lt;span class=&quot;tweet-author-handle&quot;&gt;@Znegil&lt;/span&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;a href=&quot;https://twitter.com/Znegil/status/1539715979713847298&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;

  
    
  

&lt;/a&gt;
      &lt;/div&gt;
      
      &lt;div class=&quot;tweet-body&quot;&gt;&quot;The best pizza in the world. Highly realistic photograph&quot; &lt;a href=&quot;https://twitter.com/hashtag/dalle2&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;#dalle2&lt;/a&gt; 
Which one would you eat? https://t.co/Ix2FrPH4nK&lt;/div&gt;
      
      &lt;div class=&quot;tweet-media-grid tweet-media-grid-4&quot;&gt;&lt;div class=&quot;tweet-grid-item&quot;&gt;&lt;img src=&quot;https://pbs.twimg.com/media/FV4rgrEXgAIVVdW.jpg&quot; alt=&quot;Tweet media&quot; loading=&quot;lazy&quot; /&gt;&lt;/div&gt;&lt;div class=&quot;tweet-grid-item&quot;&gt;&lt;img src=&quot;https://pbs.twimg.com/media/FV4rg9AWIAAywXK.jpg&quot; alt=&quot;Tweet media&quot; loading=&quot;lazy&quot; /&gt;&lt;/div&gt;&lt;div class=&quot;tweet-grid-item&quot;&gt;&lt;img src=&quot;https://pbs.twimg.com/media/FV4rhPSWQAI2sxG.jpg&quot; alt=&quot;Tweet media&quot; loading=&quot;lazy&quot; /&gt;&lt;/div&gt;&lt;div class=&quot;tweet-grid-item&quot;&gt;&lt;img src=&quot;https://pbs.twimg.com/media/FV4rhgnXgAA5dY6.jpg&quot; alt=&quot;Tweet media&quot; loading=&quot;lazy&quot; /&gt;&lt;/div&gt;&lt;/div&gt;
      &lt;a href=&quot;https://twitter.com/Znegil/status/1539715979713847298&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
        &lt;span class=&quot;tweet-timestamp&quot;&gt;Jun 22, 2022, 9:04 PM&lt;/span&gt;
      &lt;/a&gt;
      &lt;hr /&gt;
      &lt;div class=&quot;tweet-actions&quot;&gt;
        &lt;div class=&quot;tweet-action tweet-action-like&quot;&gt;
          

  
    
  


          &lt;span&gt;0&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class=&quot;tweet-action tweet-action-reply&quot;&gt;
          

  
    
  


          &lt;span&gt;0&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  
&lt;p&gt;It can generate brand new original, realistic faces&lt;/p&gt;

  &lt;div class=&quot;not-prose tweet-embed&quot;&gt;
    &lt;div class=&quot;tweet-card&quot;&gt;
      &lt;a href=&quot;https://twitter.com/Merzmensch/status/1539366833920286722&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;&lt;/a&gt;
      &lt;div class=&quot;tweet-header&quot;&gt;
        &lt;div class=&quot;tweet-author&quot;&gt;
          &lt;img src=&quot;https://pbs.twimg.com/profile_images/1503758199991812103/w-zW1Ll__normal.jpg&quot; alt=&quot;Merzmensch Kosmopol🧑‍🎨🤖&apos;s avatar&quot; /&gt;
          &lt;div class=&quot;tweet-author-info&quot;&gt;
            &lt;a href=&quot;https://twitter.com/Merzmensch/status/1539366833920286722&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
              &lt;div class=&quot;tweet-author-name-row&quot;&gt;
                &lt;span class=&quot;tweet-author-name&quot;&gt;Merzmensch Kosmopol🧑‍🎨🤖&lt;/span&gt;
                
              &lt;/div&gt;
            &lt;/a&gt;
            &lt;span class=&quot;tweet-author-handle&quot;&gt;@Merzmensch&lt;/span&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;a href=&quot;https://twitter.com/Merzmensch/status/1539366833920286722&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;

  
    
  

&lt;/a&gt;
      &lt;/div&gt;
      
      &lt;div class=&quot;tweet-body&quot;&gt;And in case you were wondering, &lt;a href=&quot;https://twitter.com/hashtag/dalle2&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;#dalle2&lt;/a&gt; is able to create VERY REALISTIC faces. 

&lt;a href=&quot;https://twitter.com/hashtag/dalle&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;#dalle&lt;/a&gt; &lt;a href=&quot;https://twitter.com/hashtag/dallemerz&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;#dallemerz&lt;/a&gt; https://t.co/CXgxFCcbPF&lt;/div&gt;
      
      &lt;div class=&quot;tweet-media-grid tweet-media-grid-4&quot;&gt;&lt;div class=&quot;tweet-grid-item&quot;&gt;&lt;img src=&quot;https://pbs.twimg.com/media/FVzt96wWQAAqKsc.jpg&quot; alt=&quot;Tweet media&quot; loading=&quot;lazy&quot; /&gt;&lt;/div&gt;&lt;div class=&quot;tweet-grid-item&quot;&gt;&lt;img src=&quot;https://pbs.twimg.com/media/FVzt-GMXwAQI3mC.jpg&quot; alt=&quot;Tweet media&quot; loading=&quot;lazy&quot; /&gt;&lt;/div&gt;&lt;div class=&quot;tweet-grid-item&quot;&gt;&lt;img src=&quot;https://pbs.twimg.com/media/FVzt-TAXoAUEgCk.jpg&quot; alt=&quot;Tweet media&quot; loading=&quot;lazy&quot; /&gt;&lt;/div&gt;&lt;div class=&quot;tweet-grid-item&quot;&gt;&lt;img src=&quot;https://pbs.twimg.com/media/FVzt-g4WABEEUpw.jpg&quot; alt=&quot;Tweet media&quot; loading=&quot;lazy&quot; /&gt;&lt;/div&gt;&lt;/div&gt;
      &lt;a href=&quot;https://twitter.com/Merzmensch/status/1539366833920286722&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
        &lt;span class=&quot;tweet-timestamp&quot;&gt;Jun 21, 2022, 9:57 PM&lt;/span&gt;
      &lt;/a&gt;
      &lt;hr /&gt;
      &lt;div class=&quot;tweet-actions&quot;&gt;
        &lt;div class=&quot;tweet-action tweet-action-like&quot;&gt;
          

  
    
  


          &lt;span&gt;172&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class=&quot;tweet-action tweet-action-reply&quot;&gt;
          

  
    
  


          &lt;span&gt;12&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  
&lt;p&gt;You’ll be seeing this in every product soon.&lt;/p&gt;

  &lt;div class=&quot;not-prose tweet-embed&quot;&gt;
    &lt;div class=&quot;tweet-card&quot;&gt;
      &lt;a href=&quot;https://twitter.com/IHaveFunWithAi/status/1537503259044233222&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;&lt;/a&gt;
      &lt;div class=&quot;tweet-header&quot;&gt;
        &lt;div class=&quot;tweet-author&quot;&gt;
          &lt;img src=&quot;https://pbs.twimg.com/profile_images/1539678094700810243/6igOdYwE_normal.jpg&quot; alt=&quot;IHaveFunWithAi&apos;s avatar&quot; /&gt;
          &lt;div class=&quot;tweet-author-info&quot;&gt;
            &lt;a href=&quot;https://twitter.com/IHaveFunWithAi/status/1537503259044233222&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
              &lt;div class=&quot;tweet-author-name-row&quot;&gt;
                &lt;span class=&quot;tweet-author-name&quot;&gt;IHaveFunWithAi&lt;/span&gt;
                
              &lt;/div&gt;
            &lt;/a&gt;
            &lt;span class=&quot;tweet-author-handle&quot;&gt;@IHaveFunWithAi&lt;/span&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;a href=&quot;https://twitter.com/IHaveFunWithAi/status/1537503259044233222&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;

  
    
  

&lt;/a&gt;
      &lt;/div&gt;
      
      &lt;div class=&quot;tweet-body&quot;&gt;“Spider-Man wearing Versace, 40mm photo”

&lt;a href=&quot;https://twitter.com/hashtag/dalle2&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;#dalle2&lt;/a&gt; &lt;a href=&quot;https://twitter.com/hashtag/dallemini&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;#dallemini&lt;/a&gt; &lt;a href=&quot;https://twitter.com/hashtag/art&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;#art&lt;/a&gt; https://t.co/7BOzrt7vQt&lt;/div&gt;
      
      &lt;div class=&quot;tweet-media-grid tweet-media-grid-4&quot;&gt;&lt;div class=&quot;tweet-grid-item&quot;&gt;&lt;img src=&quot;https://pbs.twimg.com/media/FVZPD_WXoAAMzZn.jpg&quot; alt=&quot;Tweet media&quot; loading=&quot;lazy&quot; /&gt;&lt;/div&gt;&lt;div class=&quot;tweet-grid-item&quot;&gt;&lt;img src=&quot;https://pbs.twimg.com/media/FVZPD_XWIAAYpdD.jpg&quot; alt=&quot;Tweet media&quot; loading=&quot;lazy&quot; /&gt;&lt;/div&gt;&lt;div class=&quot;tweet-grid-item&quot;&gt;&lt;img src=&quot;https://pbs.twimg.com/media/FVZPD_ZX0AASBe2.jpg&quot; alt=&quot;Tweet media&quot; loading=&quot;lazy&quot; /&gt;&lt;/div&gt;&lt;div class=&quot;tweet-grid-item&quot;&gt;&lt;img src=&quot;https://pbs.twimg.com/media/FVZPD_WWUAAasue.jpg&quot; alt=&quot;Tweet media&quot; loading=&quot;lazy&quot; /&gt;&lt;/div&gt;&lt;/div&gt;
      &lt;a href=&quot;https://twitter.com/IHaveFunWithAi/status/1537503259044233222&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
        &lt;span class=&quot;tweet-timestamp&quot;&gt;Jun 16, 2022, 6:31 PM&lt;/span&gt;
      &lt;/a&gt;
      &lt;hr /&gt;
      &lt;div class=&quot;tweet-actions&quot;&gt;
        &lt;div class=&quot;tweet-action tweet-action-like&quot;&gt;
          

  
    
  


          &lt;span&gt;121&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class=&quot;tweet-action tweet-action-reply&quot;&gt;
          

  
    
  


          &lt;span&gt;3&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  
&lt;p&gt;Most of the use cases I’ve seen for DALL-e are making artwork, and it’s even better at this than the photorealistic stuff.&lt;/p&gt;

  &lt;div class=&quot;not-prose tweet-embed&quot;&gt;
    &lt;div class=&quot;tweet-card&quot;&gt;
      &lt;a href=&quot;https://twitter.com/IHaveFunWithAi/status/1537882832697061377&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;&lt;/a&gt;
      &lt;div class=&quot;tweet-header&quot;&gt;
        &lt;div class=&quot;tweet-author&quot;&gt;
          &lt;img src=&quot;https://pbs.twimg.com/profile_images/1539678094700810243/6igOdYwE_normal.jpg&quot; alt=&quot;IHaveFunWithAi&apos;s avatar&quot; /&gt;
          &lt;div class=&quot;tweet-author-info&quot;&gt;
            &lt;a href=&quot;https://twitter.com/IHaveFunWithAi/status/1537882832697061377&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
              &lt;div class=&quot;tweet-author-name-row&quot;&gt;
                &lt;span class=&quot;tweet-author-name&quot;&gt;IHaveFunWithAi&lt;/span&gt;
                
              &lt;/div&gt;
            &lt;/a&gt;
            &lt;span class=&quot;tweet-author-handle&quot;&gt;@IHaveFunWithAi&lt;/span&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;a href=&quot;https://twitter.com/IHaveFunWithAi/status/1537882832697061377&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;

  
    
  

&lt;/a&gt;
      &lt;/div&gt;
      
      &lt;div class=&quot;tweet-body&quot;&gt;“Scarlet Witch at the Met Gala, oil painting”

Thread:

&lt;a href=&quot;https://twitter.com/hashtag/dalle2&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;#dalle2&lt;/a&gt; &lt;a href=&quot;https://twitter.com/hashtag/dallemini&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;#dallemini&lt;/a&gt; &lt;a href=&quot;https://twitter.com/hashtag/art&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;#art&lt;/a&gt; https://t.co/dtGjfFxGMM&lt;/div&gt;
      
      &lt;div class=&quot;tweet-media-grid tweet-media-grid-4&quot;&gt;&lt;div class=&quot;tweet-grid-item&quot;&gt;&lt;img src=&quot;https://pbs.twimg.com/media/FVeoRv1UsAMjR4Z.jpg&quot; alt=&quot;Tweet media&quot; loading=&quot;lazy&quot; /&gt;&lt;/div&gt;&lt;div class=&quot;tweet-grid-item&quot;&gt;&lt;img src=&quot;https://pbs.twimg.com/media/FVeoRtzUcAE5Kz6.jpg&quot; alt=&quot;Tweet media&quot; loading=&quot;lazy&quot; /&gt;&lt;/div&gt;&lt;div class=&quot;tweet-grid-item&quot;&gt;&lt;img src=&quot;https://pbs.twimg.com/media/FVeoRuzUUAITBls.jpg&quot; alt=&quot;Tweet media&quot; loading=&quot;lazy&quot; /&gt;&lt;/div&gt;&lt;div class=&quot;tweet-grid-item&quot;&gt;&lt;img src=&quot;https://pbs.twimg.com/media/FVeoRu4UsAEVEPb.jpg&quot; alt=&quot;Tweet media&quot; loading=&quot;lazy&quot; /&gt;&lt;/div&gt;&lt;/div&gt;
      &lt;a href=&quot;https://twitter.com/IHaveFunWithAi/status/1537882832697061377&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
        &lt;span class=&quot;tweet-timestamp&quot;&gt;Jun 17, 2022, 7:40 PM&lt;/span&gt;
      &lt;/a&gt;
      &lt;hr /&gt;
      &lt;div class=&quot;tweet-actions&quot;&gt;
        &lt;div class=&quot;tweet-action tweet-action-like&quot;&gt;
          

  
    
  


          &lt;span&gt;33&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class=&quot;tweet-action tweet-action-reply&quot;&gt;
          

  
    
  


          &lt;span&gt;2&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  

  &lt;div class=&quot;not-prose tweet-embed&quot;&gt;
    &lt;div class=&quot;tweet-card&quot;&gt;
      &lt;a href=&quot;https://twitter.com/FelurianFelicis/status/1539649183342546944&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;&lt;/a&gt;
      &lt;div class=&quot;tweet-header&quot;&gt;
        &lt;div class=&quot;tweet-author&quot;&gt;
          &lt;img src=&quot;https://pbs.twimg.com/profile_images/1486950779240034305/qEyDBUgL_normal.jpg&quot; alt=&quot;fel 😻&apos;s avatar&quot; /&gt;
          &lt;div class=&quot;tweet-author-info&quot;&gt;
            &lt;a href=&quot;https://twitter.com/FelurianFelicis/status/1539649183342546944&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
              &lt;div class=&quot;tweet-author-name-row&quot;&gt;
                &lt;span class=&quot;tweet-author-name&quot;&gt;fel 😻&lt;/span&gt;
                
              &lt;/div&gt;
            &lt;/a&gt;
            &lt;span class=&quot;tweet-author-handle&quot;&gt;@FelurianFelicis&lt;/span&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;a href=&quot;https://twitter.com/FelurianFelicis/status/1539649183342546944&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;

  
    
  

&lt;/a&gt;
      &lt;/div&gt;
      
      &lt;div class=&quot;tweet-body&quot;&gt;The University from The Name of the Wind, digital art &lt;a href=&quot;https://twitter.com/hashtag/dalle2&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;#dalle2&lt;/a&gt; &lt;a href=&quot;https://twitter.com/Dalle2Pics&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;@Dalle2Pics&lt;/a&gt; https://t.co/9dEWYTXOKZ&lt;/div&gt;
      
      
    &lt;div class=&quot;tweet-media&quot;&gt;
      &lt;img src=&quot;https://pbs.twimg.com/media/FV3uxbiXwAA6x0n.jpg&quot; alt=&quot;Tweet media&quot; loading=&quot;lazy&quot; /&gt;
    &lt;/div&gt;
      &lt;a href=&quot;https://twitter.com/FelurianFelicis/status/1539649183342546944&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
        &lt;span class=&quot;tweet-timestamp&quot;&gt;Jun 22, 2022, 4:39 PM&lt;/span&gt;
      &lt;/a&gt;
      &lt;hr /&gt;
      &lt;div class=&quot;tweet-actions&quot;&gt;
        &lt;div class=&quot;tweet-action tweet-action-like&quot;&gt;
          

  
    
  


          &lt;span&gt;3&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class=&quot;tweet-action tweet-action-reply&quot;&gt;
          

  
    
  


          &lt;span&gt;0&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  

  &lt;div class=&quot;not-prose tweet-embed&quot;&gt;
    &lt;div class=&quot;tweet-card&quot;&gt;
      &lt;a href=&quot;https://twitter.com/codexeditor/status/1539452993397211136&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;&lt;/a&gt;
      &lt;div class=&quot;tweet-header&quot;&gt;
        &lt;div class=&quot;tweet-author&quot;&gt;
          &lt;img src=&quot;https://pbs.twimg.com/profile_images/1863727843978645504/PcG8qPol_normal.jpg&quot; alt=&quot;Codex&apos;s avatar&quot; /&gt;
          &lt;div class=&quot;tweet-author-info&quot;&gt;
            &lt;a href=&quot;https://twitter.com/codexeditor/status/1539452993397211136&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
              &lt;div class=&quot;tweet-author-name-row&quot;&gt;
                &lt;span class=&quot;tweet-author-name&quot;&gt;Codex&lt;/span&gt;
                
              &lt;/div&gt;
            &lt;/a&gt;
            &lt;span class=&quot;tweet-author-handle&quot;&gt;@codexeditor&lt;/span&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;a href=&quot;https://twitter.com/codexeditor/status/1539452993397211136&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;

  
    
  

&lt;/a&gt;
      &lt;/div&gt;
      
      &lt;div class=&quot;tweet-body&quot;&gt;&quot;A mad organist expressively playing the &apos;Fugue of Uncreation&apos; on a church organ on a rocky clifftop, with a surging ocean and stormy sky at the End of Time&quot; &lt;a href=&quot;https://twitter.com/hashtag/dalle2&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;#dalle2&lt;/a&gt; https://t.co/Qs9l3yt3HZ&lt;/div&gt;
      
      
    &lt;div class=&quot;tweet-media&quot;&gt;
      &lt;img src=&quot;https://pbs.twimg.com/media/FV08UaxakAAmCTw.jpg&quot; alt=&quot;Tweet media&quot; loading=&quot;lazy&quot; /&gt;
    &lt;/div&gt;
      &lt;a href=&quot;https://twitter.com/codexeditor/status/1539452993397211136&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
        &lt;span class=&quot;tweet-timestamp&quot;&gt;Jun 22, 2022, 3:39 AM&lt;/span&gt;
      &lt;/a&gt;
      &lt;hr /&gt;
      &lt;div class=&quot;tweet-actions&quot;&gt;
        &lt;div class=&quot;tweet-action tweet-action-like&quot;&gt;
          

  
    
  


          &lt;span&gt;24&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class=&quot;tweet-action tweet-action-reply&quot;&gt;
          

  
    
  


          &lt;span&gt;1&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  
&lt;p&gt;However, my favorite ones by far are the crazy funny creative ones&lt;/p&gt;

  &lt;div class=&quot;not-prose tweet-embed&quot;&gt;
    &lt;div class=&quot;tweet-card&quot;&gt;
      &lt;a href=&quot;https://twitter.com/Dalle2Pics/status/1536423975605178369&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;&lt;/a&gt;
      &lt;div class=&quot;tweet-header&quot;&gt;
        &lt;div class=&quot;tweet-author&quot;&gt;
          &lt;img src=&quot;https://pbs.twimg.com/profile_images/1520598468494073856/shF3gmIP_normal.jpg&quot; alt=&quot;Best Dalle2 Pics&apos;s avatar&quot; /&gt;
          &lt;div class=&quot;tweet-author-info&quot;&gt;
            &lt;a href=&quot;https://twitter.com/Dalle2Pics/status/1536423975605178369&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
              &lt;div class=&quot;tweet-author-name-row&quot;&gt;
                &lt;span class=&quot;tweet-author-name&quot;&gt;Best Dalle2 Pics&lt;/span&gt;
                
              &lt;/div&gt;
            &lt;/a&gt;
            &lt;span class=&quot;tweet-author-handle&quot;&gt;@Dalle2Pics&lt;/span&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;a href=&quot;https://twitter.com/Dalle2Pics/status/1536423975605178369&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;

  
    
  

&lt;/a&gt;
      &lt;/div&gt;
      
      &lt;div class=&quot;tweet-body&quot;&gt;Homer Simpson x Dalle2 (Thread 🧵)&lt;a href=&quot;https://twitter.com/hashtag/dalle2&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;#dalle2&lt;/a&gt;2&lt;a href=&quot;https://twitter.com/hashtag/dalle&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;#dalle&lt;/a&gt;e 

“A still of Homer Simpson in The Blair Witch Project” (1/?) https://t.co/QW6y6QtWxK&lt;/div&gt;
      
      &lt;div class=&quot;tweet-media-grid tweet-media-grid-3&quot;&gt;&lt;div class=&quot;tweet-grid-item&quot;&gt;&lt;img src=&quot;https://pbs.twimg.com/media/FVJ5deuWIAA23Y4.jpg&quot; alt=&quot;Tweet media&quot; loading=&quot;lazy&quot; /&gt;&lt;/div&gt;&lt;div class=&quot;tweet-grid-item&quot;&gt;&lt;img src=&quot;https://pbs.twimg.com/media/FVJ5dewX0AAV1ph.jpg&quot; alt=&quot;Tweet media&quot; loading=&quot;lazy&quot; /&gt;&lt;/div&gt;&lt;div class=&quot;tweet-grid-item&quot;&gt;&lt;img src=&quot;https://pbs.twimg.com/media/FVJ5dl8WAAEy-5W.jpg&quot; alt=&quot;Tweet media&quot; loading=&quot;lazy&quot; /&gt;&lt;/div&gt;&lt;/div&gt;
      &lt;a href=&quot;https://twitter.com/Dalle2Pics/status/1536423975605178369&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
        &lt;span class=&quot;tweet-timestamp&quot;&gt;Jun 13, 2022, 7:03 PM&lt;/span&gt;
      &lt;/a&gt;
      &lt;hr /&gt;
      &lt;div class=&quot;tweet-actions&quot;&gt;
        &lt;div class=&quot;tweet-action tweet-action-like&quot;&gt;
          

  
    
  


          &lt;span&gt;9.2K&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class=&quot;tweet-action tweet-action-reply&quot;&gt;
          

  
    
  


          &lt;span&gt;69&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  

  &lt;div class=&quot;not-prose tweet-embed&quot;&gt;
    &lt;div class=&quot;tweet-card&quot;&gt;
      &lt;a href=&quot;https://twitter.com/Dalle2Pics/status/1539380193445519360&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;&lt;/a&gt;
      &lt;div class=&quot;tweet-header&quot;&gt;
        &lt;div class=&quot;tweet-author&quot;&gt;
          &lt;img src=&quot;https://pbs.twimg.com/profile_images/1520598468494073856/shF3gmIP_normal.jpg&quot; alt=&quot;Best Dalle2 Pics&apos;s avatar&quot; /&gt;
          &lt;div class=&quot;tweet-author-info&quot;&gt;
            &lt;a href=&quot;https://twitter.com/Dalle2Pics/status/1539380193445519360&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
              &lt;div class=&quot;tweet-author-name-row&quot;&gt;
                &lt;span class=&quot;tweet-author-name&quot;&gt;Best Dalle2 Pics&lt;/span&gt;
                
              &lt;/div&gt;
            &lt;/a&gt;
            &lt;span class=&quot;tweet-author-handle&quot;&gt;@Dalle2Pics&lt;/span&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;a href=&quot;https://twitter.com/Dalle2Pics/status/1539380193445519360&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;

  
    
  

&lt;/a&gt;
      &lt;/div&gt;
      
      &lt;div class=&quot;tweet-body&quot;&gt;God of antibacterial cleaner &lt;a href=&quot;https://twitter.com/hashtag/dalle2&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;#dalle2&lt;/a&gt; &lt;a href=&quot;https://twitter.com/hashtag/dalle&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;#dalle&lt;/a&gt; https://t.co/y35sUPIcre&lt;/div&gt;
      
      
    &lt;div class=&quot;tweet-media&quot;&gt;
      &lt;img src=&quot;https://pbs.twimg.com/media/FVz4E38XoAAz9MW.jpg&quot; alt=&quot;Tweet media&quot; loading=&quot;lazy&quot; /&gt;
    &lt;/div&gt;
      &lt;a href=&quot;https://twitter.com/Dalle2Pics/status/1539380193445519360&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
        &lt;span class=&quot;tweet-timestamp&quot;&gt;Jun 21, 2022, 10:50 PM&lt;/span&gt;
      &lt;/a&gt;
      &lt;hr /&gt;
      &lt;div class=&quot;tweet-actions&quot;&gt;
        &lt;div class=&quot;tweet-action tweet-action-like&quot;&gt;
          

  
    
  


          &lt;span&gt;946&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class=&quot;tweet-action tweet-action-reply&quot;&gt;
          

  
    
  


          &lt;span&gt;12&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  

  &lt;div class=&quot;not-prose tweet-embed&quot;&gt;
    &lt;div class=&quot;tweet-card&quot;&gt;
      &lt;a href=&quot;https://twitter.com/Dalle2Pics/status/1539137896246038530&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;&lt;/a&gt;
      &lt;div class=&quot;tweet-header&quot;&gt;
        &lt;div class=&quot;tweet-author&quot;&gt;
          &lt;img src=&quot;https://pbs.twimg.com/profile_images/1520598468494073856/shF3gmIP_normal.jpg&quot; alt=&quot;Best Dalle2 Pics&apos;s avatar&quot; /&gt;
          &lt;div class=&quot;tweet-author-info&quot;&gt;
            &lt;a href=&quot;https://twitter.com/Dalle2Pics/status/1539137896246038530&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
              &lt;div class=&quot;tweet-author-name-row&quot;&gt;
                &lt;span class=&quot;tweet-author-name&quot;&gt;Best Dalle2 Pics&lt;/span&gt;
                
              &lt;/div&gt;
            &lt;/a&gt;
            &lt;span class=&quot;tweet-author-handle&quot;&gt;@Dalle2Pics&lt;/span&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;a href=&quot;https://twitter.com/Dalle2Pics/status/1539137896246038530&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;

  
    
  

&lt;/a&gt;
      &lt;/div&gt;
      
      &lt;div class=&quot;tweet-body&quot;&gt;&quot;A renaissance painting of a guy smashing his computer because discord is down&quot; made with &lt;a href=&quot;https://twitter.com/hashtag/dalle2&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;#dalle2&lt;/a&gt; &lt;a href=&quot;https://twitter.com/hashtag/dalle&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;#dalle&lt;/a&gt; &lt;a href=&quot;https://twitter.com/hashtag/discorddown&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;#discorddown&lt;/a&gt; https://t.co/iYYciPRgCw&lt;/div&gt;
      
      &lt;div class=&quot;tweet-media-grid tweet-media-grid-2&quot;&gt;&lt;div class=&quot;tweet-grid-item&quot;&gt;&lt;img src=&quot;https://pbs.twimg.com/media/FVwdhsNXsAEp2n6.jpg&quot; alt=&quot;Tweet media&quot; loading=&quot;lazy&quot; /&gt;&lt;/div&gt;&lt;div class=&quot;tweet-grid-item&quot;&gt;&lt;img src=&quot;https://pbs.twimg.com/media/FVwdiABWUAAYdgm.jpg&quot; alt=&quot;Tweet media&quot; loading=&quot;lazy&quot; /&gt;&lt;/div&gt;&lt;/div&gt;
      &lt;a href=&quot;https://twitter.com/Dalle2Pics/status/1539137896246038530&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
        &lt;span class=&quot;tweet-timestamp&quot;&gt;Jun 21, 2022, 6:47 AM&lt;/span&gt;
      &lt;/a&gt;
      &lt;hr /&gt;
      &lt;div class=&quot;tweet-actions&quot;&gt;
        &lt;div class=&quot;tweet-action tweet-action-like&quot;&gt;
          

  
    
  


          &lt;span&gt;713&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class=&quot;tweet-action tweet-action-reply&quot;&gt;
          

  
    
  


          &lt;span&gt;3&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  

  &lt;div class=&quot;not-prose tweet-embed&quot;&gt;
    &lt;div class=&quot;tweet-card&quot;&gt;
      &lt;a href=&quot;https://twitter.com/Dalle2Pics/status/1537479108376072192&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;&lt;/a&gt;
      &lt;div class=&quot;tweet-header&quot;&gt;
        &lt;div class=&quot;tweet-author&quot;&gt;
          &lt;img src=&quot;https://pbs.twimg.com/profile_images/1520598468494073856/shF3gmIP_normal.jpg&quot; alt=&quot;Best Dalle2 Pics&apos;s avatar&quot; /&gt;
          &lt;div class=&quot;tweet-author-info&quot;&gt;
            &lt;a href=&quot;https://twitter.com/Dalle2Pics/status/1537479108376072192&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
              &lt;div class=&quot;tweet-author-name-row&quot;&gt;
                &lt;span class=&quot;tweet-author-name&quot;&gt;Best Dalle2 Pics&lt;/span&gt;
                
              &lt;/div&gt;
            &lt;/a&gt;
            &lt;span class=&quot;tweet-author-handle&quot;&gt;@Dalle2Pics&lt;/span&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;a href=&quot;https://twitter.com/Dalle2Pics/status/1537479108376072192&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;

  
    
  

&lt;/a&gt;
      &lt;/div&gt;
      
      &lt;div class=&quot;tweet-body&quot;&gt;“McDonalds in the style of art deco, gold, photograph ” made with &lt;a href=&quot;https://twitter.com/hashtag/dalle2&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;#dalle2&lt;/a&gt; &lt;a href=&quot;https://twitter.com/hashtag/dalle&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;#dalle&lt;/a&gt; https://t.co/7UocClH6vq&lt;/div&gt;
      
      &lt;div class=&quot;tweet-media-grid tweet-media-grid-3&quot;&gt;&lt;div class=&quot;tweet-grid-item&quot;&gt;&lt;img src=&quot;https://pbs.twimg.com/media/FVY5GWRXoAAlONt.jpg&quot; alt=&quot;Tweet media&quot; loading=&quot;lazy&quot; /&gt;&lt;/div&gt;&lt;div class=&quot;tweet-grid-item&quot;&gt;&lt;img src=&quot;https://pbs.twimg.com/media/FVY5GWTX0AAoU4-.jpg&quot; alt=&quot;Tweet media&quot; loading=&quot;lazy&quot; /&gt;&lt;/div&gt;&lt;div class=&quot;tweet-grid-item&quot;&gt;&lt;img src=&quot;https://pbs.twimg.com/media/FVY5GWQWYAAE2sy.jpg&quot; alt=&quot;Tweet media&quot; loading=&quot;lazy&quot; /&gt;&lt;/div&gt;&lt;/div&gt;
      &lt;a href=&quot;https://twitter.com/Dalle2Pics/status/1537479108376072192&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
        &lt;span class=&quot;tweet-timestamp&quot;&gt;Jun 16, 2022, 4:55 PM&lt;/span&gt;
      &lt;/a&gt;
      &lt;hr /&gt;
      &lt;div class=&quot;tweet-actions&quot;&gt;
        &lt;div class=&quot;tweet-action tweet-action-like&quot;&gt;
          

  
    
  


          &lt;span&gt;692&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class=&quot;tweet-action tweet-action-reply&quot;&gt;
          

  
    
  


          &lt;span&gt;12&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  

  &lt;div class=&quot;not-prose tweet-embed&quot;&gt;
    &lt;div class=&quot;tweet-card&quot;&gt;
      &lt;a href=&quot;https://twitter.com/Dalle2Pics/status/1538629689685725184&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;&lt;/a&gt;
      &lt;div class=&quot;tweet-header&quot;&gt;
        &lt;div class=&quot;tweet-author&quot;&gt;
          &lt;img src=&quot;https://pbs.twimg.com/profile_images/1520598468494073856/shF3gmIP_normal.jpg&quot; alt=&quot;Best Dalle2 Pics&apos;s avatar&quot; /&gt;
          &lt;div class=&quot;tweet-author-info&quot;&gt;
            &lt;a href=&quot;https://twitter.com/Dalle2Pics/status/1538629689685725184&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
              &lt;div class=&quot;tweet-author-name-row&quot;&gt;
                &lt;span class=&quot;tweet-author-name&quot;&gt;Best Dalle2 Pics&lt;/span&gt;
                
              &lt;/div&gt;
            &lt;/a&gt;
            &lt;span class=&quot;tweet-author-handle&quot;&gt;@Dalle2Pics&lt;/span&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;a href=&quot;https://twitter.com/Dalle2Pics/status/1538629689685725184&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;

  
    
  

&lt;/a&gt;
      &lt;/div&gt;
      
      &lt;div class=&quot;tweet-body&quot;&gt;&quot;Sculpture of a bodybuilder made entirely from fresh broccoli, by Antoni Gaudi, studio lighting&quot; &lt;a href=&quot;https://twitter.com/hashtag/dalle2&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;#dalle2&lt;/a&gt; &lt;a href=&quot;https://twitter.com/hashtag/dalle&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;#dalle&lt;/a&gt; 
Credit: &lt;a href=&quot;https://twitter.com/rh_paint&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;@rh_paint&lt;/a&gt; https://t.co/5sxrukmJfp&lt;/div&gt;
      
      
    &lt;div class=&quot;tweet-media&quot;&gt;
      &lt;img src=&quot;https://pbs.twimg.com/media/FVpOhTGXEAEzBWd.jpg&quot; alt=&quot;Tweet media&quot; loading=&quot;lazy&quot; /&gt;
    &lt;/div&gt;
      &lt;a href=&quot;https://twitter.com/Dalle2Pics/status/1538629689685725184&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
        &lt;span class=&quot;tweet-timestamp&quot;&gt;Jun 19, 2022, 9:07 PM&lt;/span&gt;
      &lt;/a&gt;
      &lt;hr /&gt;
      &lt;div class=&quot;tweet-actions&quot;&gt;
        &lt;div class=&quot;tweet-action tweet-action-like&quot;&gt;
          

  
    
  


          &lt;span&gt;1.2K&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class=&quot;tweet-action tweet-action-reply&quot;&gt;
          

  
    
  


          &lt;span&gt;21&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  

  &lt;div class=&quot;not-prose tweet-embed&quot;&gt;
    &lt;div class=&quot;tweet-card&quot;&gt;
      &lt;a href=&quot;https://twitter.com/Dalle2Pics/status/1539005769017958404&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;&lt;/a&gt;
      &lt;div class=&quot;tweet-header&quot;&gt;
        &lt;div class=&quot;tweet-author&quot;&gt;
          &lt;img src=&quot;https://pbs.twimg.com/profile_images/1520598468494073856/shF3gmIP_normal.jpg&quot; alt=&quot;Best Dalle2 Pics&apos;s avatar&quot; /&gt;
          &lt;div class=&quot;tweet-author-info&quot;&gt;
            &lt;a href=&quot;https://twitter.com/Dalle2Pics/status/1539005769017958404&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
              &lt;div class=&quot;tweet-author-name-row&quot;&gt;
                &lt;span class=&quot;tweet-author-name&quot;&gt;Best Dalle2 Pics&lt;/span&gt;
                
              &lt;/div&gt;
            &lt;/a&gt;
            &lt;span class=&quot;tweet-author-handle&quot;&gt;@Dalle2Pics&lt;/span&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;a href=&quot;https://twitter.com/Dalle2Pics/status/1539005769017958404&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;

  
    
  

&lt;/a&gt;
      &lt;/div&gt;
      
      &lt;div class=&quot;tweet-body&quot;&gt;RUN HOMIE !! &lt;a href=&quot;https://twitter.com/hashtag/dalle2&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;#dalle2&lt;/a&gt; &lt;a href=&quot;https://twitter.com/hashtag/dalle&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;#dalle&lt;/a&gt; https://t.co/L0dMBbjtNb&lt;/div&gt;
      
      
    &lt;div class=&quot;tweet-media&quot;&gt;
      &lt;img src=&quot;https://pbs.twimg.com/media/FVulO1PXoAEtaFd.jpg&quot; alt=&quot;Tweet media&quot; loading=&quot;lazy&quot; /&gt;
    &lt;/div&gt;
      &lt;a href=&quot;https://twitter.com/Dalle2Pics/status/1539005769017958404&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
        &lt;span class=&quot;tweet-timestamp&quot;&gt;Jun 20, 2022, 10:02 PM&lt;/span&gt;
      &lt;/a&gt;
      &lt;hr /&gt;
      &lt;div class=&quot;tweet-actions&quot;&gt;
        &lt;div class=&quot;tweet-action tweet-action-like&quot;&gt;
          

  
    
  


          &lt;span&gt;1.2K&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class=&quot;tweet-action tweet-action-reply&quot;&gt;
          

  
    
  


          &lt;span&gt;7&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  
&lt;p&gt;Learn more about DALL-E from this video.&lt;/p&gt;
&lt;iframe width=&quot;100%&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/SVcsDDABEkM&quot; frameborder=&quot;0&quot; loading=&quot;lazy&quot; allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen&gt;&lt;/iframe&gt;
&lt;h2&gt;Analytics 📈&lt;/h2&gt;
&lt;p&gt;Really happy that the openai plugin just broke 100 stars on github!&lt;/p&gt;
&lt;p&gt;On top of that, I’ve gained around 30 newsletters to a total of 60 in about two weeks. I also gained about 220 followers. It feels like pretty good progress considering I had -1 followers last month!&lt;/p&gt;
&lt;h2&gt;Outro&lt;/h2&gt;
&lt;p&gt;I hope you enjoyed the newsletter! Next week I plan to talk more in-depth about using AI for notetaking using the latest next-generation database, AI, and NLP(Natural Language Processing) technology.&lt;/p&gt;
&lt;p&gt;Check out the &lt;a href=&quot;https://briansunter.com/newsletter-roadmap&quot;&gt;newsletter-roadmap&lt;/a&gt; to see what I have in mind for future issues. Let me know on &lt;a href=&quot;https://twitter.com&quot;&gt;Twitter @bsunter&lt;/a&gt;&lt;/p&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Newsletter Issue 2</title><link>https://briansunter.com/newsletter/issue-2</link><guid isPermaLink="true">https://briansunter.com/newsletter/issue-2</guid><description>Intro to using AI to take notes and examples from of the community using the logseq openai plugin</description><pubDate>Sun, 19 Jun 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/kubernetes-gpt_1672123546658_0.hfQGMhwE_zTjMS.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;h3&gt;Summary and Reflection 🤔&lt;/h3&gt;
&lt;p&gt;I couldn’t be happier about the positive reactions to my new projects and newsletter.&lt;/p&gt;
&lt;p&gt;Last week I released a small plugin for the Logseq text editor, and I’ve been getting a lot of positive feedback on it from all over the world.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://docs.logseq.com/#/page/Contents&quot;&gt;Logseq&lt;/a&gt; is an open-source note taking application.&lt;/p&gt;
&lt;p&gt;It allows you to write “plugins” or “apps” for the text editor you can release for others.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://platform.openai.com/&quot;&gt;A new type of AI or “Artificial Intelligence” called GPT3&lt;/a&gt; can be used to write notes. It can write your book report if you ask it to “Write a study guide to Hamlet.”&lt;/p&gt;
&lt;p&gt;I released a plugin for an AI assistant that can write articles and answer questions for you.&lt;/p&gt;
&lt;p&gt;This technology is brand new and much better than Alexa, Siri, or Google Assistant.&lt;/p&gt;
&lt;p&gt;One of my favorite things about being a coder is thinking of an idea and building a tool for myself that solves a problem. Once I make a helpful tool, it’s just a little extra effort to put it online and share it with the world. I’m planning to make more of my projects and writing publicly available.&lt;/p&gt;
&lt;p&gt;I had fun looking at the Twitter bios of people talking about the plugin. One plugin user is a self-described “Chaotic good statistical learning Ph.D. candidate working to strengthen humanitarian health systems,” precisely the type of person I want using the plugin! It feels good that I can enable others to do real-world work like this by knowing a bit of coding and how to get the code out there.&lt;/p&gt;
&lt;p&gt;The plugin is called &lt;a href=&quot;https://github.com/briansunter/logseq-plugin-gpt3-openai&quot;&gt;logseq-gtp3-openai&lt;/a&gt; and lets you send commands to this powerful AI system from inside your text editor. It can do a lot of things like write and summarize articles. It’s easy to get started. &lt;a href=&quot;https://github.com/logseq/logseq/releases&quot;&gt;Download it in the Logseq marketplace&lt;/a&gt;, and let me know what you think!&lt;/p&gt;
&lt;p&gt;In this newsletter, I’ll share some of the community’s reactions to my new AI plugin, some thoughts on productivity, a few interesting reads from the week, and what I have for the next newsletter issue.&lt;/p&gt;
&lt;h2&gt;Updates 🆕&lt;/h2&gt;
&lt;p&gt;Here is some feedback for users on Twitter&lt;/p&gt;
&lt;h2&gt;Feedback on ai-powered-notetaking-with-the-gpt-3-logseq-plugin|Logseq Openai plugin&lt;/h2&gt;
&lt;p&gt;This user summed up how I feel perfectly. Now that AI is part of my workflow, I want to keep it.&lt;/p&gt;
&lt;p&gt;As far as I know, there is nothing on the market similar to OpenAI’s GPT3.&lt;/p&gt;

  &lt;div class=&quot;not-prose tweet-embed&quot;&gt;
    &lt;div class=&quot;tweet-card&quot;&gt;
      &lt;a href=&quot;https://twitter.com/irace/status/1535056205441277962&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;&lt;/a&gt;
      &lt;div class=&quot;tweet-header&quot;&gt;
        &lt;div class=&quot;tweet-author&quot;&gt;
          &lt;img src=&quot;https://pbs.twimg.com/profile_images/2047304287076679680/z6XXnDsG_normal.jpg&quot; alt=&quot;Bryan Irace&apos;s avatar&quot; /&gt;
          &lt;div class=&quot;tweet-author-info&quot;&gt;
            &lt;a href=&quot;https://twitter.com/irace/status/1535056205441277962&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
              &lt;div class=&quot;tweet-author-name-row&quot;&gt;
                &lt;span class=&quot;tweet-author-name&quot;&gt;Bryan Irace&lt;/span&gt;
                
              &lt;/div&gt;
            &lt;/a&gt;
            &lt;span class=&quot;tweet-author-handle&quot;&gt;@irace&lt;/span&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;a href=&quot;https://twitter.com/irace/status/1535056205441277962&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;

  
    
  

&lt;/a&gt;
      &lt;/div&gt;
      
      &lt;div class=&quot;tweet-body&quot;&gt;One of those can’t-go-back-now-that-I’ve-experienced-this workflows that will just totally ruin anything less for you.&lt;/div&gt;
      
      
      &lt;a href=&quot;https://twitter.com/irace/status/1535056205441277962&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
        &lt;span class=&quot;tweet-timestamp&quot;&gt;Jun 10, 2022, 12:28 AM&lt;/span&gt;
      &lt;/a&gt;
      &lt;hr /&gt;
      &lt;div class=&quot;tweet-actions&quot;&gt;
        &lt;div class=&quot;tweet-action tweet-action-like&quot;&gt;
          

  
    
  


          &lt;span&gt;1&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class=&quot;tweet-action tweet-action-reply&quot;&gt;
          

  
    
  


          &lt;span&gt;1&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  
&lt;p&gt;AI and humans will work together more closely and sooner than we thought. We’re getting “autocomplete for everything.”&lt;/p&gt;

  &lt;div class=&quot;not-prose tweet-embed&quot;&gt;
    &lt;div class=&quot;tweet-card&quot;&gt;
      &lt;a href=&quot;https://twitter.com/Daniel_Van_Zant/status/1535985529627484160&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;&lt;/a&gt;
      &lt;div class=&quot;tweet-header&quot;&gt;
        &lt;div class=&quot;tweet-author&quot;&gt;
          &lt;img src=&quot;https://pbs.twimg.com/profile_images/1534652548627542018/XgU4wZAH_normal.jpg&quot; alt=&quot;Daniel Van Zant&apos;s avatar&quot; /&gt;
          &lt;div class=&quot;tweet-author-info&quot;&gt;
            &lt;a href=&quot;https://twitter.com/Daniel_Van_Zant/status/1535985529627484160&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
              &lt;div class=&quot;tweet-author-name-row&quot;&gt;
                &lt;span class=&quot;tweet-author-name&quot;&gt;Daniel Van Zant&lt;/span&gt;
                

  


              &lt;/div&gt;
            &lt;/a&gt;
            &lt;span class=&quot;tweet-author-handle&quot;&gt;@Daniel_Van_Zant&lt;/span&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;a href=&quot;https://twitter.com/Daniel_Van_Zant/status/1535985529627484160&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;

  
    
  

&lt;/a&gt;
      &lt;/div&gt;
      
      &lt;div class=&quot;tweet-body&quot;&gt;Very cool stuff. The way AI can enable knowledge workers to be better is one of my favorite parts of the AI revolution.&lt;/div&gt;
      
      
      &lt;a href=&quot;https://twitter.com/Daniel_Van_Zant/status/1535985529627484160&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
        &lt;span class=&quot;tweet-timestamp&quot;&gt;Jun 12, 2022, 2:01 PM&lt;/span&gt;
      &lt;/a&gt;
      &lt;hr /&gt;
      &lt;div class=&quot;tweet-actions&quot;&gt;
        &lt;div class=&quot;tweet-action tweet-action-like&quot;&gt;
          

  
    
  


          &lt;span&gt;3&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class=&quot;tweet-action tweet-action-reply&quot;&gt;
          

  
    
  


          &lt;span&gt;0&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  
&lt;p&gt;Dentists love the plugin. I wonder how/if my own dentist stays up to date on the latest cutting-edge dental research 🤔&lt;/p&gt;

  &lt;div class=&quot;not-prose tweet-embed&quot;&gt;
    &lt;div class=&quot;tweet-card&quot;&gt;
      &lt;a href=&quot;https://twitter.com/wirtzdan/status/1535136325527080960&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;&lt;/a&gt;
      &lt;div class=&quot;tweet-header&quot;&gt;
        &lt;div class=&quot;tweet-author&quot;&gt;
          &lt;img src=&quot;https://pbs.twimg.com/profile_images/1371714814704246785/m_6un9_d_normal.jpg&quot; alt=&quot;Daniel Wirtz&apos;s avatar&quot; /&gt;
          &lt;div class=&quot;tweet-author-info&quot;&gt;
            &lt;a href=&quot;https://twitter.com/wirtzdan/status/1535136325527080960&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
              &lt;div class=&quot;tweet-author-name-row&quot;&gt;
                &lt;span class=&quot;tweet-author-name&quot;&gt;Daniel Wirtz&lt;/span&gt;
                
              &lt;/div&gt;
            &lt;/a&gt;
            &lt;span class=&quot;tweet-author-handle&quot;&gt;@wirtzdan&lt;/span&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;a href=&quot;https://twitter.com/wirtzdan/status/1535136325527080960&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;

  
    
  

&lt;/a&gt;
      &lt;/div&gt;
      
      &lt;div class=&quot;tweet-body&quot;&gt;Just one word: brilliant! 

So much fun to play be around with this. And really helpful too!&lt;/div&gt;
      
      
      &lt;a href=&quot;https://twitter.com/wirtzdan/status/1535136325527080960&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
        &lt;span class=&quot;tweet-timestamp&quot;&gt;Jun 10, 2022, 5:46 AM&lt;/span&gt;
      &lt;/a&gt;
      &lt;hr /&gt;
      &lt;div class=&quot;tweet-actions&quot;&gt;
        &lt;div class=&quot;tweet-action tweet-action-like&quot;&gt;
          

  
    
  


          &lt;span&gt;4&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class=&quot;tweet-action tweet-action-reply&quot;&gt;
          

  
    
  


          &lt;span&gt;0&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  
&lt;p&gt;Google docs and Microsoft word are about to get smart. Clippy is going to be a genius soon.&lt;/p&gt;

  &lt;div class=&quot;not-prose tweet-embed&quot;&gt;
    &lt;div class=&quot;tweet-card&quot;&gt;
      &lt;a href=&quot;https://twitter.com/sceeto/status/1535235258756521984&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;&lt;/a&gt;
      &lt;div class=&quot;tweet-header&quot;&gt;
        &lt;div class=&quot;tweet-author&quot;&gt;
          &lt;img src=&quot;https://pbs.twimg.com/profile_images/1195333880775094272/Vg4McFQb_normal.png&quot; alt=&quot;...sceeto&apos;s avatar&quot; /&gt;
          &lt;div class=&quot;tweet-author-info&quot;&gt;
            &lt;a href=&quot;https://twitter.com/sceeto/status/1535235258756521984&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
              &lt;div class=&quot;tweet-author-name-row&quot;&gt;
                &lt;span class=&quot;tweet-author-name&quot;&gt;...sceeto&lt;/span&gt;
                

  


              &lt;/div&gt;
            &lt;/a&gt;
            &lt;span class=&quot;tweet-author-handle&quot;&gt;@sceeto&lt;/span&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;a href=&quot;https://twitter.com/sceeto/status/1535235258756521984&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;

  
    
  

&lt;/a&gt;
      &lt;/div&gt;
      
      &lt;div class=&quot;tweet-body&quot;&gt;&lt;a href=&quot;https://twitter.com/Bsunter&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;@Bsunter&lt;/a&gt; &lt;a href=&quot;https://twitter.com/logseq&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;@logseq&lt;/a&gt; &lt;a href=&quot;https://twitter.com/akcdoglovers&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;@akcdoglovers&lt;/a&gt; &apos;&lt;a href=&quot;https://twitter.com/Bsunter&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;@Bsunter&lt;/a&gt;  You&apos;ve brought information at your fingertips to a whole new level.   Every text editor will have embed &lt;a href=&quot;https://twitter.com/hashtag/AI&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;#AI&lt;/a&gt; or become ancient overnight.  

It Will be interesting to see how long until &lt;a href=&quot;https://twitter.com/hashtag/MSFT&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;#MSFT&lt;/a&gt; has this functioning in &lt;a href=&quot;https://twitter.com/hashtag/Word&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;#Word&lt;/a&gt;.&lt;/div&gt;
      
      
      &lt;a href=&quot;https://twitter.com/sceeto/status/1535235258756521984&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
        &lt;span class=&quot;tweet-timestamp&quot;&gt;Jun 10, 2022, 12:19 PM&lt;/span&gt;
      &lt;/a&gt;
      &lt;hr /&gt;
      &lt;div class=&quot;tweet-actions&quot;&gt;
        &lt;div class=&quot;tweet-action tweet-action-like&quot;&gt;
          

  
    
  


          &lt;span&gt;1&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class=&quot;tweet-action tweet-action-reply&quot;&gt;
          

  
    
  


          &lt;span&gt;0&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  
&lt;p&gt;I thought this was funny. I usually ask the AI questions. But this user was instead getting the AI to ask him questions. I’ve tried making philosophical content like this as well, and it’s fascinating to see what the AI thinks about things like the meaning of life (even though it’s fancy autocomplete)&lt;/p&gt;

  &lt;div class=&quot;not-prose tweet-embed&quot;&gt;
    &lt;div class=&quot;tweet-card&quot;&gt;
      &lt;a href=&quot;https://twitter.com/indeed_100/status/1534447943503302656&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;&lt;/a&gt;
      &lt;div class=&quot;tweet-header&quot;&gt;
        &lt;div class=&quot;tweet-author&quot;&gt;
          &lt;img src=&quot;https://pbs.twimg.com/profile_images/1729790400913711104/IdbF0Bsu_normal.jpg&quot; alt=&quot;inde3d100&apos;s avatar&quot; /&gt;
          &lt;div class=&quot;tweet-author-info&quot;&gt;
            &lt;a href=&quot;https://twitter.com/indeed_100/status/1534447943503302656&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
              &lt;div class=&quot;tweet-author-name-row&quot;&gt;
                &lt;span class=&quot;tweet-author-name&quot;&gt;inde3d100&lt;/span&gt;
                

  


              &lt;/div&gt;
            &lt;/a&gt;
            &lt;span class=&quot;tweet-author-handle&quot;&gt;@indeed_100&lt;/span&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;a href=&quot;https://twitter.com/indeed_100/status/1534447943503302656&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;

  
    
  

&lt;/a&gt;
      &lt;/div&gt;
      
      &lt;div class=&quot;tweet-body&quot;&gt;Just a casual conversation with &lt;a href=&quot;https://twitter.com/hashtag/GPT3&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;#GPT3&lt;/a&gt; in &lt;a href=&quot;https://twitter.com/hashtag/logseq&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;#logseq&lt;/a&gt; https://t.co/YajzASEYcj&lt;/div&gt;
      
      
    &lt;div class=&quot;tweet-media&quot;&gt;
      &lt;img src=&quot;https://pbs.twimg.com/media/FUt0QqlXwAI3E75.jpg&quot; alt=&quot;Tweet media&quot; loading=&quot;lazy&quot; /&gt;
    &lt;/div&gt;
      &lt;a href=&quot;https://twitter.com/indeed_100/status/1534447943503302656&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
        &lt;span class=&quot;tweet-timestamp&quot;&gt;Jun 8, 2022, 8:11 AM&lt;/span&gt;
      &lt;/a&gt;
      &lt;hr /&gt;
      &lt;div class=&quot;tweet-actions&quot;&gt;
        &lt;div class=&quot;tweet-action tweet-action-like&quot;&gt;
          

  
    
  


          &lt;span&gt;24&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class=&quot;tweet-action tweet-action-reply&quot;&gt;
          

  
    
  


          &lt;span&gt;3&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  

  &lt;div class=&quot;not-prose tweet-embed&quot;&gt;
    &lt;div class=&quot;tweet-card&quot;&gt;
      &lt;a href=&quot;https://twitter.com/ilmarsV/status/1534466432620281858&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;&lt;/a&gt;
      &lt;div class=&quot;tweet-header&quot;&gt;
        &lt;div class=&quot;tweet-author&quot;&gt;
          &lt;img src=&quot;https://pbs.twimg.com/profile_images/2053476221548142592/E8EfyigR_normal.jpg&quot; alt=&quot;Ilmars&apos;s avatar&quot; /&gt;
          &lt;div class=&quot;tweet-author-info&quot;&gt;
            &lt;a href=&quot;https://twitter.com/ilmarsV/status/1534466432620281858&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
              &lt;div class=&quot;tweet-author-name-row&quot;&gt;
                &lt;span class=&quot;tweet-author-name&quot;&gt;Ilmars&lt;/span&gt;
                

  


              &lt;/div&gt;
            &lt;/a&gt;
            &lt;span class=&quot;tweet-author-handle&quot;&gt;@ilmarsV&lt;/span&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;a href=&quot;https://twitter.com/ilmarsV/status/1534466432620281858&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;

  
    
  

&lt;/a&gt;
      &lt;/div&gt;
      
      &lt;div class=&quot;tweet-body&quot;&gt;I just had one too. AI confirms that it has studied and observed us for years. Nothing to worry about... 😃&lt;a href=&quot;https://twitter.com/hashtag/AI&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;#AI&lt;/a&gt;I https://t.co/AT8Z7L3sEa&lt;/div&gt;
      
      
    &lt;div class=&quot;tweet-media&quot;&gt;
      &lt;img src=&quot;https://pbs.twimg.com/media/FUuEQW_WIAA_iCG.png&quot; alt=&quot;Tweet media&quot; loading=&quot;lazy&quot; /&gt;
    &lt;/div&gt;
      &lt;a href=&quot;https://twitter.com/ilmarsV/status/1534466432620281858&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
        &lt;span class=&quot;tweet-timestamp&quot;&gt;Jun 8, 2022, 9:24 AM&lt;/span&gt;
      &lt;/a&gt;
      &lt;hr /&gt;
      &lt;div class=&quot;tweet-actions&quot;&gt;
        &lt;div class=&quot;tweet-action tweet-action-like&quot;&gt;
          

  
    
  


          &lt;span&gt;2&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class=&quot;tweet-action tweet-action-reply&quot;&gt;
          

  
    
  


          &lt;span&gt;0&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  
&lt;p&gt;This user told me they found the plugin helpful in helping them understand code in an obscure language. You can ask it to explain any code in English.&lt;/p&gt;
&lt;p&gt;A feature I still need to release made it into one of the videos. For now, type &lt;code&gt;Summarize Text:&lt;/code&gt; instead.&lt;/p&gt;

  &lt;div class=&quot;not-prose tweet-embed&quot;&gt;
    &lt;div class=&quot;tweet-card&quot;&gt;
      &lt;a href=&quot;https://twitter.com/shezthedev/status/1534498138932842498&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;&lt;/a&gt;
      &lt;div class=&quot;tweet-header&quot;&gt;
        &lt;div class=&quot;tweet-author&quot;&gt;
          &lt;img src=&quot;https://pbs.twimg.com/profile_images/1525126630531792898/w8P55kBA_normal.jpg&quot; alt=&quot;ShezTheDev&apos;s avatar&quot; /&gt;
          &lt;div class=&quot;tweet-author-info&quot;&gt;
            &lt;a href=&quot;https://twitter.com/shezthedev/status/1534498138932842498&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
              &lt;div class=&quot;tweet-author-name-row&quot;&gt;
                &lt;span class=&quot;tweet-author-name&quot;&gt;ShezTheDev&lt;/span&gt;
                
              &lt;/div&gt;
            &lt;/a&gt;
            &lt;span class=&quot;tweet-author-handle&quot;&gt;@shezthedev&lt;/span&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;a href=&quot;https://twitter.com/shezthedev/status/1534498138932842498&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;

  
    
  

&lt;/a&gt;
      &lt;/div&gt;
      
      &lt;div class=&quot;tweet-body&quot;&gt;&lt;a href=&quot;https://twitter.com/Bsunter&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;@Bsunter&lt;/a&gt; &lt;a href=&quot;https://twitter.com/OpenAI&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;@OpenAI&lt;/a&gt; &lt;a href=&quot;https://twitter.com/logseq&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;@logseq&lt;/a&gt; Brian this is incredible. You are a hero! Is there anything i couldve omitted in setup such that im missing the /tldr command?&lt;/div&gt;
      
      
      &lt;a href=&quot;https://twitter.com/shezthedev/status/1534498138932842498&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
        &lt;span class=&quot;tweet-timestamp&quot;&gt;Jun 8, 2022, 11:30 AM&lt;/span&gt;
      &lt;/a&gt;
      &lt;hr /&gt;
      &lt;div class=&quot;tweet-actions&quot;&gt;
        &lt;div class=&quot;tweet-action tweet-action-like&quot;&gt;
          

  
    
  


          &lt;span&gt;0&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class=&quot;tweet-action tweet-action-reply&quot;&gt;
          

  
    
  


          &lt;span&gt;0&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  
&lt;p&gt;This AI tech became available to the general public six months ago, so many people tried it for the first time through this plugin. I have yet to learn about consumer products using GPT3.&lt;/p&gt;

  &lt;div class=&quot;not-prose tweet-embed&quot;&gt;
    &lt;div class=&quot;tweet-card&quot;&gt;
      &lt;a href=&quot;https://twitter.com/Ashish_situ/status/1534399620230545408&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;&lt;/a&gt;
      &lt;div class=&quot;tweet-header&quot;&gt;
        &lt;div class=&quot;tweet-author&quot;&gt;
          &lt;img src=&quot;https://pbs.twimg.com/profile_images/1534541144641589248/hBPeRd8L_normal.jpg&quot; alt=&quot;Ashish&apos;s avatar&quot; /&gt;
          &lt;div class=&quot;tweet-author-info&quot;&gt;
            &lt;a href=&quot;https://twitter.com/Ashish_situ/status/1534399620230545408&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
              &lt;div class=&quot;tweet-author-name-row&quot;&gt;
                &lt;span class=&quot;tweet-author-name&quot;&gt;Ashish&lt;/span&gt;
                
              &lt;/div&gt;
            &lt;/a&gt;
            &lt;span class=&quot;tweet-author-handle&quot;&gt;@Ashish_situ&lt;/span&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;a href=&quot;https://twitter.com/Ashish_situ/status/1534399620230545408&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;

  
    
  

&lt;/a&gt;
      &lt;/div&gt;
      
      &lt;div class=&quot;tweet-body&quot;&gt;&lt;a href=&quot;https://twitter.com/Bsunter&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;@Bsunter&lt;/a&gt; &lt;a href=&quot;https://twitter.com/OpenAI&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;@OpenAI&lt;/a&gt; &lt;a href=&quot;https://twitter.com/logseq&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;@logseq&lt;/a&gt; I tried it&apos;s amazing&lt;/div&gt;
      
      
      &lt;a href=&quot;https://twitter.com/Ashish_situ/status/1534399620230545408&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
        &lt;span class=&quot;tweet-timestamp&quot;&gt;Jun 8, 2022, 4:59 AM&lt;/span&gt;
      &lt;/a&gt;
      &lt;hr /&gt;
      &lt;div class=&quot;tweet-actions&quot;&gt;
        &lt;div class=&quot;tweet-action tweet-action-like&quot;&gt;
          

  
    
  


          &lt;span&gt;1&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class=&quot;tweet-action tweet-action-reply&quot;&gt;
          

  
    
  


          &lt;span&gt;1&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  

  &lt;div class=&quot;not-prose tweet-embed&quot;&gt;
    &lt;div class=&quot;tweet-card&quot;&gt;
      &lt;a href=&quot;https://twitter.com/WuPingJu/status/1537072229091246080&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;&lt;/a&gt;
      &lt;div class=&quot;tweet-header&quot;&gt;
        &lt;div class=&quot;tweet-author&quot;&gt;
          &lt;img src=&quot;https://pbs.twimg.com/profile_images/1823017438306557952/cbCRBiNs_normal.jpg&quot; alt=&quot;PJ Wu&apos;s avatar&quot; /&gt;
          &lt;div class=&quot;tweet-author-info&quot;&gt;
            &lt;a href=&quot;https://twitter.com/WuPingJu/status/1537072229091246080&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
              &lt;div class=&quot;tweet-author-name-row&quot;&gt;
                &lt;span class=&quot;tweet-author-name&quot;&gt;PJ Wu&lt;/span&gt;
                
              &lt;/div&gt;
            &lt;/a&gt;
            &lt;span class=&quot;tweet-author-handle&quot;&gt;@WuPingJu&lt;/span&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;a href=&quot;https://twitter.com/WuPingJu/status/1537072229091246080&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;

  
    
  

&lt;/a&gt;
      &lt;/div&gt;
      
      &lt;div class=&quot;tweet-body&quot;&gt;This plugin is so amazing!&lt;/div&gt;
      
      
      &lt;a href=&quot;https://twitter.com/WuPingJu/status/1537072229091246080&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
        &lt;span class=&quot;tweet-timestamp&quot;&gt;Jun 15, 2022, 1:59 PM&lt;/span&gt;
      &lt;/a&gt;
      &lt;hr /&gt;
      &lt;div class=&quot;tweet-actions&quot;&gt;
        &lt;div class=&quot;tweet-action tweet-action-like&quot;&gt;
          

  
    
  


          &lt;span&gt;3&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class=&quot;tweet-action tweet-action-reply&quot;&gt;
          

  
    
  


          &lt;span&gt;2&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  

  &lt;div class=&quot;not-prose tweet-embed&quot;&gt;
    &lt;div class=&quot;tweet-card&quot;&gt;
      &lt;a href=&quot;https://twitter.com/Aaron3lias/status/1537201417022083072&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;&lt;/a&gt;
      &lt;div class=&quot;tweet-header&quot;&gt;
        &lt;div class=&quot;tweet-author&quot;&gt;
          &lt;img src=&quot;https://pbs.twimg.com/profile_images/1538611582954983424/tf1qsyip_normal.jpg&quot; alt=&quot;Aaron E.&apos;s avatar&quot; /&gt;
          &lt;div class=&quot;tweet-author-info&quot;&gt;
            &lt;a href=&quot;https://twitter.com/Aaron3lias/status/1537201417022083072&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
              &lt;div class=&quot;tweet-author-name-row&quot;&gt;
                &lt;span class=&quot;tweet-author-name&quot;&gt;Aaron E.&lt;/span&gt;
                
              &lt;/div&gt;
            &lt;/a&gt;
            &lt;span class=&quot;tweet-author-handle&quot;&gt;@Aaron3lias&lt;/span&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;a href=&quot;https://twitter.com/Aaron3lias/status/1537201417022083072&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;

  
    
  

&lt;/a&gt;
      &lt;/div&gt;
      
      &lt;div class=&quot;tweet-body&quot;&gt;&lt;a href=&quot;https://twitter.com/Bsunter&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;@Bsunter&lt;/a&gt; &lt;a href=&quot;https://twitter.com/logseq&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;@logseq&lt;/a&gt; Holy cow man. You’re revolutionizing the note taking system&lt;/div&gt;
      
      
      &lt;a href=&quot;https://twitter.com/Aaron3lias/status/1537201417022083072&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
        &lt;span class=&quot;tweet-timestamp&quot;&gt;Jun 15, 2022, 10:32 PM&lt;/span&gt;
      &lt;/a&gt;
      &lt;hr /&gt;
      &lt;div class=&quot;tweet-actions&quot;&gt;
        &lt;div class=&quot;tweet-action tweet-action-like&quot;&gt;
          

  
    
  


          &lt;span&gt;2&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class=&quot;tweet-action tweet-action-reply&quot;&gt;
          

  
    
  


          &lt;span&gt;1&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  
&lt;p&gt;Putting your work on the internet makes you realize how big the world is. I love seeing the international developer community try out the plugin. You know your idea is making the rounds when you see your name surrounded by mandarin Chinese.&lt;/p&gt;
&lt;p&gt;https://notes.pinchlime.com/snapshots/what-i-tried-today/tried-to-use-logseq-plugin-gpt3-openai/&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Screenshot 2022-12-26 at 8.52.16 PM&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1518px) 1518px, 100vw&quot; width=&quot;1518&quot; height=&quot;1160&quot; src=&quot;https://briansunter.com/_astro/Screenshot_2022-12-26_at_8.52.16_PM_1672123954817_0.DvzsY2ez_ZSvb7Y.webp&quot; srcset=&quot;https://briansunter.com/_astro/Screenshot_2022-12-26_at_8.52.16_PM_1672123954817_0.DvzsY2ez_ZEArEu.webp 640w, https://briansunter.com/_astro/Screenshot_2022-12-26_at_8.52.16_PM_1672123954817_0.DvzsY2ez_1K1xR5.webp 750w, https://briansunter.com/_astro/Screenshot_2022-12-26_at_8.52.16_PM_1672123954817_0.DvzsY2ez_Z6uvSV.webp 828w, https://briansunter.com/_astro/Screenshot_2022-12-26_at_8.52.16_PM_1672123954817_0.DvzsY2ez_Z14D7t2.webp 1080w, https://briansunter.com/_astro/Screenshot_2022-12-26_at_8.52.16_PM_1672123954817_0.DvzsY2ez_2ht7kk.webp 1280w, https://briansunter.com/_astro/Screenshot_2022-12-26_at_8.52.16_PM_1672123954817_0.DvzsY2ez_ZSvb7Y.webp 1518w&quot; /&gt;&lt;figcaption&gt;Screenshot 2022-12-26 at 8.52.16 PM&lt;/figcaption&gt;&lt;/figure&gt;

  &lt;div class=&quot;not-prose tweet-embed&quot;&gt;
    &lt;div class=&quot;tweet-card&quot;&gt;
      &lt;a href=&quot;https://twitter.com/BollbachGuy/status/1537146633116340226&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;&lt;/a&gt;
      &lt;div class=&quot;tweet-header&quot;&gt;
        &lt;div class=&quot;tweet-author&quot;&gt;
          &lt;img src=&quot;https://pbs.twimg.com/profile_images/1602763536119234563/Xok9Vrlb_normal.jpg&quot; alt=&quot;guy philipp bollbach&apos;s avatar&quot; /&gt;
          &lt;div class=&quot;tweet-author-info&quot;&gt;
            &lt;a href=&quot;https://twitter.com/BollbachGuy/status/1537146633116340226&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
              &lt;div class=&quot;tweet-author-name-row&quot;&gt;
                &lt;span class=&quot;tweet-author-name&quot;&gt;guy philipp bollbach&lt;/span&gt;
                
              &lt;/div&gt;
            &lt;/a&gt;
            &lt;span class=&quot;tweet-author-handle&quot;&gt;@BollbachGuy&lt;/span&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;a href=&quot;https://twitter.com/BollbachGuy/status/1537146633116340226&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;

  
    
  

&lt;/a&gt;
      &lt;/div&gt;
      
      &lt;div class=&quot;tweet-body&quot;&gt;Scaffolding z.B. im Bildungsbereich bekommt eine praktische Hilfestellung mit &lt;a href=&quot;https://twitter.com/hashtag/gpt3&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;#gpt3&lt;/a&gt; und Werkzeugen (in diesem Fall &lt;a href=&quot;https://twitter.com/logseq&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;@logseq&lt;/a&gt; ), die es leicht verwendbar machen.&lt;/div&gt;
      
      
      &lt;a href=&quot;https://twitter.com/BollbachGuy/status/1537146633116340226&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
        &lt;span class=&quot;tweet-timestamp&quot;&gt;Jun 15, 2022, 6:54 PM&lt;/span&gt;
      &lt;/a&gt;
      &lt;hr /&gt;
      &lt;div class=&quot;tweet-actions&quot;&gt;
        &lt;div class=&quot;tweet-action tweet-action-like&quot;&gt;
          

  
    
  


          &lt;span&gt;2&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class=&quot;tweet-action tweet-action-reply&quot;&gt;
          

  
    
  


          &lt;span&gt;1&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  
&lt;h2&gt;Productivity Toolkit 🛠️&lt;/h2&gt;
&lt;p&gt;In this section, I’ll share a productivity tip I’ve learned recently.&lt;/p&gt;
&lt;p&gt;One of my favorite productivity techniques is the &lt;a href=&quot;https://briansunter.com/daily-highlight-productivity-technique&quot;&gt;daily-highlight-productivity-technique&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;For a long time, I always had a sinking feeling I didn’t accomplish “enough” at the end of the day.&lt;/p&gt;
&lt;p&gt;Eventually, I realized I never even defined what “enough” was.&lt;/p&gt;
&lt;p&gt;Now, I pick one thing I want to accomplish in the morning.&lt;/p&gt;
&lt;p&gt;This technique helps me focus on what will truly move my life forward and end each day with a sense of accomplishment.&lt;/p&gt;
&lt;p&gt;See my post on the subject here: &lt;a href=&quot;https://briansunter.com/daily-highlight-productivity-technique&quot;&gt;daily-highlight-productivity-technique&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Brain Food 🧠&lt;/h2&gt;
&lt;h3&gt;Quote&lt;/h3&gt;
&lt;p&gt;The Last Question is a short story by Isaac Asimov.&lt;/p&gt;
&lt;p&gt;It’s a timely short story about asking AI the answers to life’s biggest questions. This story shows up on the front page of Hacker News almost every year, and it is very thought-provoking. It feels relevant because a Google engineer recently asked their new AI, “Are you sentient?”&lt;/p&gt;
&lt;p&gt;Isaac Asimov said it was his favorite short story he’d written.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;“Ask Multivac.”
“You ask Multivac. I dare you. Five dollars says it can’t be done.”&lt;br /&gt;
Adell was just drunk enough to try, just sober enough to be able to phrase the necessary&lt;br /&gt;
symbols and operations into a question which, in words, might have corresponded to this: …&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;em&gt;The Last Question&lt;/em&gt; by Isaac Asimov&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=8XOtx4sa9k4&quot;&gt;(Read by Leonard Nimoy)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://archive.org/details/Science_Fiction_Quarterly_New_Series_v04n05_1956-11_slpn/page/n50/mode/1up?view=theater&quot;&gt;Original Scans&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Related: &lt;a href=&quot;https://highexistence.com/the-last-answer-short-story/&quot;&gt;The Last Answer&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Link of the week&lt;/h3&gt;
&lt;p&gt;I remember when I first moved to San Francisco, and Uber was doing a “match muni” promotion, where you could take an Uber anywhere in the city for $2.25 (same as the “muni” bus)&lt;/p&gt;
&lt;p&gt;I would not be surprised if Uber went back to $50 a ride after more tech money dries up, like a traditional taxi.&lt;/p&gt;
&lt;p&gt;We can also expect companies to go evil and try to extract more value from us through ads&lt;/p&gt;
&lt;p&gt;I’ll expect to see more ads on youtube, Facebook, Instagram, TikTok, etc., and prices of video subscriptions to go up&lt;/p&gt;
&lt;p&gt;It may be an excellent excuse to find other hobbies than watching Netflix and ordering Uber Eats.&lt;/p&gt;

  &lt;div class=&quot;not-prose tweet-embed&quot;&gt;
    &lt;div class=&quot;tweet-card&quot;&gt;
      &lt;a href=&quot;https://twitter.com/Bsunter/status/1537546979357564928&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;&lt;/a&gt;
      &lt;div class=&quot;tweet-header&quot;&gt;
        &lt;div class=&quot;tweet-author&quot;&gt;
          &lt;img src=&quot;https://pbs.twimg.com/profile_images/507230915458646016/POGcr0En_normal.jpeg&quot; alt=&quot;Brian Sunter&apos;s avatar&quot; /&gt;
          &lt;div class=&quot;tweet-author-info&quot;&gt;
            &lt;a href=&quot;https://twitter.com/Bsunter/status/1537546979357564928&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
              &lt;div class=&quot;tweet-author-name-row&quot;&gt;
                &lt;span class=&quot;tweet-author-name&quot;&gt;Brian Sunter&lt;/span&gt;
                

  


              &lt;/div&gt;
            &lt;/a&gt;
            &lt;span class=&quot;tweet-author-handle&quot;&gt;@Bsunter&lt;/span&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;a href=&quot;https://twitter.com/Bsunter/status/1537546979357564928&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;

  
    
  

&lt;/a&gt;
      &lt;/div&gt;
      
      &lt;div class=&quot;tweet-body&quot;&gt;Food delivery is about to get a lot more expensive now that the air is coming out of the tech bubble. 

Good time to learn home cooking!

&lt;a href=&quot;https://www.theatlantic.com/newsletters/archive/2022/06/uber-ride-share-prices-high-inflation/661250/&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;theatlantic.com/newsletters/ar…&lt;/a&gt;&lt;/div&gt;
      
      
      &lt;a href=&quot;https://twitter.com/Bsunter/status/1537546979357564928&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
        &lt;span class=&quot;tweet-timestamp&quot;&gt;Jun 16, 2022, 9:25 PM&lt;/span&gt;
      &lt;/a&gt;
      &lt;hr /&gt;
      &lt;div class=&quot;tweet-actions&quot;&gt;
        &lt;div class=&quot;tweet-action tweet-action-like&quot;&gt;
          

  
    
  


          &lt;span&gt;1&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class=&quot;tweet-action tweet-action-reply&quot;&gt;
          

  
    
  


          &lt;span&gt;1&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  
&lt;h2&gt;Analytics 📈&lt;/h2&gt;
&lt;p&gt;Twitter Analytics are fun. I am the ultimate late-comer to Twitter and started using it for the first time this month. Last month I had -1 new follower. This month I gained around 200 so far. I had a few “hit” logseq plugins, so I don’t expect this growth to continue forever, but seeing the numbers go up is fun.&lt;/p&gt;
&lt;h2&gt;Outro&lt;/h2&gt;
&lt;p&gt;Thanks for reading! This week I announced my new plugin and shared some feedback from the community.&lt;/p&gt;
&lt;p&gt;Next week I plan on writing about some productivity techniques in Logseq and how I manage “projects” in my life, using this newsletter as an example.&lt;/p&gt;
&lt;p&gt;Check out the &lt;a href=&quot;https://briansunter.com/newsletter-roadmap&quot;&gt;newsletter-roadmap&lt;/a&gt; to see what I have in mind for future issues. Let me know on &lt;a href=&quot;https://twitter.com&quot;&gt;twitter @bsunter&lt;/a&gt;&lt;/p&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Daily Highlight Productivity Technique</title><link>https://briansunter.com/daily-highlight-productivity-technique</link><guid isPermaLink="true">https://briansunter.com/daily-highlight-productivity-technique</guid><description>Pick one thing each day that matters most. A simple technique that cuts through endless to-do lists.</description><pubDate>Fri, 17 Jun 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/daily-highlight_1672273385215_0.D5meXarC_ZiQKOC.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;The most powerful productivity technique I’ve discovered is also the simplest: the “Daily Highlight”.&lt;/p&gt;
&lt;h3&gt;What is a Daily Highlight?&lt;/h3&gt;
&lt;p&gt;In the morning, choose one activity that would make you feel accomplished at the end of the day. If someone were to ask you “What was the highlight of your day?”, this would be the answer.&lt;/p&gt;
&lt;p&gt;This technique is effective because it forces you to focus on your true priorities instead of constantly reacting and getting distracted.&lt;/p&gt;
&lt;p&gt;Doing more tasks isn’t the answer, it’s focusing on accomplishing what matters.&lt;/p&gt;
&lt;h3&gt;How to Choose a Daily Highlight&lt;/h3&gt;
&lt;p&gt;Choosing one singular thing to focus on can be daunting, so here are some tips:&lt;/p&gt;
&lt;h4&gt;Medium Term Tasks&lt;/h4&gt;
&lt;p&gt;The timeline of your Daily Highlight should be between your short term tasks and long term goals.&lt;/p&gt;
&lt;p&gt;I ask myself, what’s the one thing that would move my life forward the most? Is there a milestone for a long term goal I can make progress toward?&lt;/p&gt;
&lt;p&gt;A rule of thumb is your daily highlight should take 60-90 minutes to complete.&lt;/p&gt;
&lt;p&gt;This is long enough to meaningfully affect your life and get into a flow state, yet short enough that you can fit it into your schedule.&lt;/p&gt;
&lt;h4&gt;Urgency&lt;/h4&gt;
&lt;p&gt;Is there anything with an approaching deadline coming up?&lt;/p&gt;
&lt;p&gt;If your driver’s license is about to expire, you should make a trip to the DMV to renew it soon.&lt;/p&gt;
&lt;h5&gt;Satisfaction&lt;/h5&gt;
&lt;p&gt;Satisfaction means doing something productive that you want to do.&lt;/p&gt;
&lt;p&gt;This is often a project you’ve been meaning to get around to, like taking that online class or drafting another chapter of your novel.&lt;/p&gt;
&lt;p&gt;If you don’t make an active effort to prioritize your personal projects, you’ll never make consistent progress.&lt;/p&gt;
&lt;h5&gt;Fun&lt;/h5&gt;
&lt;p&gt;Not everything needs to be productive and efficient. You should also plan for fun.&lt;/p&gt;
&lt;p&gt;Some examples of fun Daily Highlights are going to lunch with a coworker or learning a new song on guitar&lt;/p&gt;
&lt;h3&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;Creating time in my routine, ideally early in the day, and planning ahead when I’ll accomplish my Daily Highlight has helped keep me consistent.&lt;/p&gt;
&lt;p&gt;Even if you don’t fully complete your Daily Highlight, I think identifying your Daily Highlight and making some progress on a goal is so much better than not having a plan at all.&lt;/p&gt;
&lt;p&gt;How much more could you do with 365 planned, focused sessions per year?&lt;/p&gt;
&lt;h3&gt;Learn More&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://maketime.blog/article/feeling-busy-and-distracted-its-not-your-fault/&quot;&gt;Make Time Blog&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;Ali Abdaal The Best Productivity Hacks of All Time&lt;/h4&gt;
&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/4aYVLpY5FYU?start=397&quot; title=&quot;YouTube video player&quot; frameborder=&quot;0&quot; allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen&gt;&lt;/iframe&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator><category>blog</category></item><item><title>Logseq YouTube Captions</title><link>https://briansunter.com/projects/logseq-youtube-captions</link><guid isPermaLink="true">https://briansunter.com/projects/logseq-youtube-captions</guid><description>A Logseq plugin that grabs the captions for any YouTube link in a block and pastes the transcript in below it.</description><pubDate>Tue, 14 Jun 2022 05:29:10 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/logseq-youtube-captions-hero.BMOdNJ7a_Z16PWxA.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;A Logseq plugin that fetches the captions for any YouTube video referenced in a block and inserts the full transcript as a child block. Useful for keeping a searchable record of talks and tutorials in your graph, and even more useful when paired with an LLM plugin that can summarise or extract takeaways from the transcript.&lt;/p&gt;
&lt;h2&gt;Features&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;One slash command (&lt;code&gt;/get-youtube-captions&lt;/code&gt;) or block-menu entry&lt;/li&gt;
&lt;li&gt;Works with embedded &lt;code&gt;{{video}}&lt;/code&gt; blocks and any YouTube URL format&lt;/li&gt;
&lt;li&gt;Configurable caption language&lt;/li&gt;
&lt;li&gt;Pairs naturally with the GPT-3 plugin for summarisation&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Usage&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Drop a YouTube link into any block&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;/get-youtube-captions&lt;/code&gt; from the slash menu&lt;/li&gt;
&lt;li&gt;The transcript lands as a child block under the link&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;URL formats supported:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Standard &lt;code&gt;youtube.com/watch?v=…&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Short links &lt;code&gt;youtu.be/…&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Embedded &lt;code&gt;{{video …}}&lt;/code&gt; blocks&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Pairing with an LLM plugin&lt;/h2&gt;
&lt;p&gt;Run &lt;a href=&quot;https://github.com/briansunter/logseq-plugin-gpt3-openai&quot;&gt;my GPT-3 plugin&lt;/a&gt; on the resulting transcript to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Pull the top five takeaways from a long talk&lt;/li&gt;
&lt;li&gt;Summarise lectures and tutorials&lt;/li&gt;
&lt;li&gt;Extract key points from interviews&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Settings&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Caption language&lt;/li&gt;
&lt;li&gt;Helpful error messages when the requested language isn’t available&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Installation&lt;/h2&gt;
&lt;p&gt;Search for &lt;code&gt;get-youtube-captions&lt;/code&gt; in the Logseq Marketplace.&lt;/p&gt;
&lt;h2&gt;Technology Stack&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;TypeScript with Vite&lt;/li&gt;
&lt;li&gt;Logseq Plugin API&lt;/li&gt;
&lt;li&gt;YouTube caption extraction&lt;/li&gt;
&lt;li&gt;Semantic-release for publishing&lt;/li&gt;
&lt;/ul&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Newsletter Issue 1</title><link>https://briansunter.com/newsletter/issue-1</link><guid isPermaLink="true">https://briansunter.com/newsletter/issue-1</guid><description>Launching my newsletter, public graph, and logseq gpt3 AI plugin</description><pubDate>Sun, 12 Jun 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/image_1660689722955_0.CqN-k34T_ZoO9KF.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h3&gt;Summary and Reflection 🤔&lt;/h3&gt;
&lt;p&gt;Hello Everyone,
I’m launching a weekly newsletter to share my writing. I’ve started publishing my notes on both &lt;a href=&quot;https://briansunter.com&quot;&gt;my personal website&lt;/a&gt; as well as my &lt;a href=&quot;https://briansunter.com/graph&quot;&gt;full Logseq graph&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I’ve been taking notes for a long time. The &lt;a href=&quot;https://logseq.com/&quot;&gt;logseq&lt;/a&gt; note-taking app helps me publish my notes online.&lt;/p&gt;
&lt;p&gt;I enjoy learning how others take notes since everyone’s process is unique. I also hope to share something useful or inspire you since I’ve already been so inspired seeing what you all are doing!&lt;/p&gt;
&lt;h3&gt;Updates 🆕&lt;/h3&gt;
&lt;h3&gt;Starting my Public Graph&lt;/h3&gt;
&lt;p&gt;The &lt;a href=&quot;https://logseq.com&quot;&gt;Logseq note taking app&lt;/a&gt; has a feature where you can publish your knowledge graph as a static site.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/sawhney17/logseq-schrodinger&quot;&gt;I’m using the hugo plugin, but it also supports publishing a rich single page app.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It lets you visualize your notes as a set of interconnected nodes&lt;/p&gt;
&lt;p&gt;I’ve built up quite a few of these notes over time and I have lots of ideas for posts.&lt;/p&gt;
&lt;h4&gt;Overview of my Private Graph&lt;/h4&gt;
&lt;p&gt;I have thousands of private notes migrated to &lt;a href=&quot;https://twitter.com/logseq&quot;&gt;@logseq&lt;/a&gt; from &lt;a href=&quot;https://twitter.com/RoamResearch&quot;&gt;@RoamResearch&lt;/a&gt; that I’ve written over the past few years, so it’s a bit of a project to curate them.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;image&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 2868px) 2868px, 100vw&quot; width=&quot;2868&quot; height=&quot;1926&quot; src=&quot;https://briansunter.com/_astro/image_1660689722955_0.CqN-k34T_1FxEC2.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1660689722955_0.CqN-k34T_2vbkme.webp 640w, https://briansunter.com/_astro/image_1660689722955_0.CqN-k34T_1lSuKQ.webp 750w, https://briansunter.com/_astro/image_1660689722955_0.CqN-k34T_ZAUgNw.webp 828w, https://briansunter.com/_astro/image_1660689722955_0.CqN-k34T_t5jnA.webp 1080w, https://briansunter.com/_astro/image_1660689722955_0.CqN-k34T_kDoV6.webp 1280w, https://briansunter.com/_astro/image_1660689722955_0.CqN-k34T_1AwF1l.webp 1668w, https://briansunter.com/_astro/image_1660689722955_0.CqN-k34T_Z2tgKeA.webp 2048w, https://briansunter.com/_astro/image_1660689722955_0.CqN-k34T_ZFJR0f.webp 2560w, https://briansunter.com/_astro/image_1660689722955_0.CqN-k34T_1FxEC2.webp 2868w&quot; /&gt;&lt;figcaption&gt;image&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;I’m hoping to share a lot of the stuff I’ve learned over the years.&lt;/p&gt;
&lt;h4&gt;Zoomed In&lt;/h4&gt;
&lt;p&gt;This is it zoomed all the way in. The density is impressive.&lt;/p&gt;
&lt;h4&gt;Lifehacking Holidays&lt;/h4&gt;
&lt;p&gt;Many of my notes fall into the “lifehacking” category and are ways of trying to live my life more efficiently.&lt;/p&gt;
&lt;p&gt;Most of my notes are just on boring things I use to run my life. If you zoom in on the detail view, there’s stuff like “thanksgiving 2021”.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;image&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 4096px) 4096px, 100vw&quot; width=&quot;4096&quot; height=&quot;2565&quot; src=&quot;https://briansunter.com/_astro/image_1660690104275_0.kKCjSRzn_LgVtk.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1660690104275_0.kKCjSRzn_Z2icW0R.webp 640w, https://briansunter.com/_astro/image_1660690104275_0.kKCjSRzn_29cv8j.webp 750w, https://briansunter.com/_astro/image_1660690104275_0.kKCjSRzn_CtKVP.webp 828w, https://briansunter.com/_astro/image_1660690104275_0.kKCjSRzn_Z1DBLKo.webp 1080w, https://briansunter.com/_astro/image_1660690104275_0.kKCjSRzn_Bgfej.webp 1280w, https://briansunter.com/_astro/image_1660690104275_0.kKCjSRzn_1XG2GX.webp 1668w, https://briansunter.com/_astro/image_1660690104275_0.kKCjSRzn_rKEFi.webp 2048w, https://briansunter.com/_astro/image_1660690104275_0.kKCjSRzn_ZN5Y9e.webp 2560w, https://briansunter.com/_astro/image_1660690104275_0.kKCjSRzn_LgVtk.webp 4096w&quot; /&gt;&lt;figcaption&gt;image&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;That’s a page based on my thanksgiving template. So I have template workflows for everything in my life, like holidays.&lt;/p&gt;
&lt;h3&gt;Launching my OpenAI Plugin&lt;/h3&gt;
&lt;figure&gt;&lt;img alt=&quot;image&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 750px) 750px, 100vw&quot; width=&quot;750&quot; height=&quot;375&quot; src=&quot;https://briansunter.com/_astro/image_1660707354608_0.CZvGaVKo_Z2tlTdE.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1660707354608_0.CZvGaVKo_Z1mkhcA.webp 640w, https://briansunter.com/_astro/image_1660707354608_0.CZvGaVKo_Z2tlTdE.webp 750w&quot; /&gt;&lt;figcaption&gt;image&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;I launched my &lt;a href=&quot;https://github.com/briansunter/logseq-plugin-gpt3-openai&quot;&gt;OpenAI plugin for logseq&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This allows users to run OpenAI tasks inside the logseq text editor.&lt;/p&gt;
&lt;p&gt;It is basically an AI assistant you can ask questions to inside your text editor. Ask it the meaning of life if you want. Its responses are scarily intelligent.&lt;/p&gt;
&lt;p&gt;OpenAI is powered by gpt3, which is a new kind of AI technology where you give it human-like commands, and it performs the task. It’s impressive how well it can write blog articles, code, and summarize text.&lt;/p&gt;
&lt;p&gt;I plan on talking much more about using AI to study in future newsletters.&lt;/p&gt;
&lt;p&gt;Go here to learn more about &lt;a href=&quot;https://platform.openai.com/docs/introduction&quot;&gt;OpenAI GPT-3&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;OpenAI GPT-3 Logseq Plugin Demo&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://youtu.be/zV-gx28onmg&quot;&gt;Here’s a demo of using GPT-3 to study&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Using GPT3 for studying is a use case brand new to most people. I wrote a quick &lt;a href=&quot;https://twitter.com/Bsunter/status/1535730704138444801?s=20&amp;amp;t=SCOObCkMoHC2yTbmMvNTmA&quot;&gt;tweet thread&lt;/a&gt; on how I’ve been using it to study machine learning. This is an excellent place to start learning the openai logseq plugin.&lt;/p&gt;
&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/zV-gx28onmg&quot; title=&quot;YouTube video player&quot; frameborder=&quot;0&quot; allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen&gt;&lt;/iframe&gt;
&lt;h3&gt;GPT-3 study guides&lt;/h3&gt;
&lt;p&gt;My favorite general use case for gpt3 for learning is generating study guides for topics.&lt;/p&gt;
&lt;p&gt;You can just ask it to &lt;code&gt;Write a guide to kubernetes for a programmer&lt;/code&gt; and it will write a whole comprehensive original article for you.&lt;/p&gt;
&lt;p&gt;See the study guide and the commands I used to make it here &lt;a href=&quot;https://briansunter.com/how-to-use-gpt3-to-learn-kubernetes&quot;&gt;how-to-use-gpt3-to-learn-kubernetes&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Once you have the list of topics, I enjoy arranging high-level study guides as mind maps. You need to indent some lines, and the logseq mindmap plugin makes a great visual representation.&lt;/p&gt;
&lt;h3&gt;Algorithms Study Guide&lt;/h3&gt;
&lt;p&gt;I also like using GPT-3 for really personalized learning guides.&lt;/p&gt;
&lt;p&gt;This is a diagram for my generated based on the logseq markmap plugin.&lt;/p&gt;
&lt;p&gt;Visit the algorithms-boot-camp|Algorithms Boot Camp&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;image&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 601px) 601px, 100vw&quot; width=&quot;601&quot; height=&quot;1607&quot; src=&quot;https://briansunter.com/_astro/image_1660701101843_0.B-x2w_lQ_ZMUcey.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1660701101843_0.B-x2w_lQ_ZMUcey.webp 601w&quot; /&gt;&lt;figcaption&gt;image&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h3&gt;Machine Learning Study Guide&lt;/h3&gt;
&lt;p&gt;I asked GPT-3 what to study to learn machine learning to create this guide &lt;a href=&quot;https://briansunter.com/machine-learning-study-guide&quot;&gt;machine-learning-study-guide&lt;/a&gt;&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;image&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1245px) 1245px, 100vw&quot; width=&quot;1245&quot; height=&quot;1621&quot; src=&quot;https://briansunter.com/_astro/image_1660701161556_0.DDgIUzQr_Z25fHCs.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1660701161556_0.DDgIUzQr_2epF6N.webp 640w, https://briansunter.com/_astro/image_1660701161556_0.DDgIUzQr_2tGu5s.webp 750w, https://briansunter.com/_astro/image_1660701161556_0.DDgIUzQr_Z21T1ua.webp 828w, https://briansunter.com/_astro/image_1660701161556_0.DDgIUzQr_15Tx2X.webp 1080w, https://briansunter.com/_astro/image_1660701161556_0.DDgIUzQr_Z25fHCs.webp 1245w&quot; /&gt;&lt;figcaption&gt;image&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;See the AI output I used to hand assemble this guide here &lt;a href=&quot;https://briansunter.com/ai-powered-notetaking-with-the-gpt-3-logseq-plugin&quot;&gt;ai-powered-notetaking-with-the-gpt-3-logseq-plugin&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;GPT-3 Chinese Slang Tutorial&lt;/h3&gt;
&lt;p&gt;I asked gpt-3 to write me a guide on how to talk to my Chinese followers here: &lt;a href=&quot;https://briansunter.com/gpt3-chinese-language-tutor&quot;&gt;gpt3-chinese-language-tutor&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Generating diagrams from english prompts with GPT-3&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://mermaid-js.github.io/mermaid/#/&quot;&gt;mermaid.js&lt;/a&gt; is a text-based language and tool that helps you visualize diagrams.&lt;/p&gt;
&lt;p&gt;You can write some plain text, and the tool creates a visual flow chart.&lt;/p&gt;
&lt;p&gt;Since it’s represented in plain text, GPT-3 can write it for us and does a good job.&lt;/p&gt;
&lt;h4&gt;CI/CD mermaid chart&lt;/h4&gt;
&lt;p&gt;This diagram is for a “deploy on commit” CI/CD system.&lt;/p&gt;
&lt;p&gt;The yellow highlights are my gpt-3 “prompts”&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;FU2lSscUEAAoTVT&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 775px) 775px, 100vw&quot; width=&quot;775&quot; height=&quot;1093&quot; src=&quot;https://briansunter.com/_astro/FU2lSscUEAAoTVT_1660704821764_0.CeX5qJT7_2aQ9tg.webp&quot; srcset=&quot;https://briansunter.com/_astro/FU2lSscUEAAoTVT_1660704821764_0.CeX5qJT7_Z2ff6tx.webp 640w, https://briansunter.com/_astro/FU2lSscUEAAoTVT_1660704821764_0.CeX5qJT7_2sfdNz.webp 750w, https://briansunter.com/_astro/FU2lSscUEAAoTVT_1660704821764_0.CeX5qJT7_2aQ9tg.webp 775w&quot; /&gt;&lt;figcaption&gt;FU2lSscUEAAoTVT&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;It did an OK job generating cicd diagrams, but it generated a lot of junk ones before getting a reasonable one, which I lightly edited.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;FU2lSscUEAAoTVT&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 775px) 775px, 100vw&quot; width=&quot;775&quot; height=&quot;1093&quot; src=&quot;https://briansunter.com/_astro/FU2lSscUEAAoTVT_1660704821764_0.CeX5qJT7_2aQ9tg.webp&quot; srcset=&quot;https://briansunter.com/_astro/FU2lSscUEAAoTVT_1660704821764_0.CeX5qJT7_Z2ff6tx.webp 640w, https://briansunter.com/_astro/FU2lSscUEAAoTVT_1660704821764_0.CeX5qJT7_2sfdNz.webp 750w, https://briansunter.com/_astro/FU2lSscUEAAoTVT_1660704821764_0.CeX5qJT7_2aQ9tg.webp 775w&quot; /&gt;&lt;figcaption&gt;FU2lSscUEAAoTVT&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;This is what the mermaidjs text looks like:&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Mermaid diagram source code generated by GPT-3&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 775px) 775px, 100vw&quot; width=&quot;775&quot; height=&quot;402&quot; src=&quot;https://briansunter.com/_astro/FU2lSsbUYAEWiD_1660704904870_0.DCX6TGkh_Z1G6MYg.webp&quot; srcset=&quot;https://briansunter.com/_astro/FU2lSsbUYAEWiD_1660704904870_0.DCX6TGkh_ZYDLm4.webp 640w, https://briansunter.com/_astro/FU2lSsbUYAEWiD_1660704904870_0.DCX6TGkh_Z1FMis2.webp 750w, https://briansunter.com/_astro/FU2lSsbUYAEWiD_1660704904870_0.DCX6TGkh_Z1G6MYg.webp 775w&quot; /&gt;&lt;figcaption&gt;Mermaid diagram source code generated by GPT-3&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h3&gt;Getting Things Done Mermaid Diagram&lt;/h3&gt;
&lt;p&gt;GPT-3 can visualize the main workflow from getting things done as a mermaid markup diagram.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;FU2jKadUEAAxVWO&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1311px) 1311px, 100vw&quot; width=&quot;1311&quot; height=&quot;659&quot; src=&quot;https://briansunter.com/_astro/FU2jKadUEAAxVWO_1660704761290_0.C1RM2Big_1Yb8fu.webp&quot; srcset=&quot;https://briansunter.com/_astro/FU2jKadUEAAxVWO_1660704761290_0.C1RM2Big_Z204Dgz.webp 640w, https://briansunter.com/_astro/FU2jKadUEAAxVWO_1660704761290_0.C1RM2Big_GpNMM.webp 750w, https://briansunter.com/_astro/FU2jKadUEAAxVWO_1660704761290_0.C1RM2Big_20R7Fv.webp 828w, https://briansunter.com/_astro/FU2jKadUEAAxVWO_1660704761290_0.C1RM2Big_1jlsTo.webp 1080w, https://briansunter.com/_astro/FU2jKadUEAAxVWO_1660704761290_0.C1RM2Big_2efesK.webp 1280w, https://briansunter.com/_astro/FU2jKadUEAAxVWO_1660704761290_0.C1RM2Big_1Yb8fu.webp 1311w&quot; /&gt;&lt;figcaption&gt;FU2jKadUEAAxVWO&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;For fun, I had it generate a far larger diagram than any sane human would for every dog breed by type.&lt;/p&gt;
&lt;h4&gt;American Kennel Club Dog Breeds&lt;/h4&gt;
&lt;p&gt;See my list of &lt;a href=&quot;https://briansunter.com/poodle-mixes&quot;&gt;poodle-mixes&lt;/a&gt; generated by AI.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;image&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 775px) 775px, 100vw&quot; width=&quot;775&quot; height=&quot;1491&quot; src=&quot;https://briansunter.com/_astro/image_1660704945441_0.Bj946giI_2bvTbB.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1660704945441_0.Bj946giI_2e8oz5.webp 640w, https://briansunter.com/_astro/image_1660704945441_0.Bj946giI_1MlCuB.webp 750w, https://briansunter.com/_astro/image_1660704945441_0.Bj946giI_2bvTbB.webp 775w&quot; /&gt;&lt;figcaption&gt;image&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h3&gt;Interview With an AI&lt;/h3&gt;
&lt;p&gt;Another fun experiment was using GPT-3 as a conversational interface.&lt;/p&gt;
&lt;p&gt;It has an uncanny ability to sound human-like sometimes.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;image&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1284px) 1284px, 100vw&quot; width=&quot;1284&quot; height=&quot;1551&quot; src=&quot;https://briansunter.com/_astro/image_1660708351466_0.BnyJEvvY_Z1xdvtf.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1660708351466_0.BnyJEvvY_1MpCEw.webp 640w, https://briansunter.com/_astro/image_1660708351466_0.BnyJEvvY_Z29wThB.webp 750w, https://briansunter.com/_astro/image_1660708351466_0.BnyJEvvY_1XqWKK.webp 828w, https://briansunter.com/_astro/image_1660708351466_0.BnyJEvvY_Z24HGTz.webp 1080w, https://briansunter.com/_astro/image_1660708351466_0.BnyJEvvY_Z1F6TGT.webp 1280w, https://briansunter.com/_astro/image_1660708351466_0.BnyJEvvY_Z1xdvtf.webp 1284w&quot; /&gt;&lt;figcaption&gt;image&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=GhkReKdNp1k&quot;&gt;Watch the video of the interview here&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I thought it was funny the google engineer leaked his AI chat transcripts right after I had the same idea…&lt;/p&gt;
&lt;h3&gt;Productivity Toolkit 🛠️&lt;/h3&gt;
&lt;p&gt;My favorite overall productivity technique: &lt;a href=&quot;https://briansunter.com/daily-highlight-productivity-technique&quot;&gt;daily-highlight-productivity-technique&lt;/a&gt;, centering yourself on your most crucial day task as early as possible&lt;/p&gt;
&lt;h3&gt;Brain Food 🧠&lt;/h3&gt;
&lt;h4&gt;Quote&lt;/h4&gt;
&lt;p&gt;I just picked up &lt;a href=&quot;https://twitter.com/fortelabs&quot;&gt;Tiago Forte&lt;/a&gt;’s &lt;a href=&quot;https://www.amazon.com/Building-Second-Brain-Organize-Potential-ebook/dp/B09LVVN9L3/ref=tmm_kin_swatch_0?_encoding=UTF8&amp;amp;qid=&amp;amp;sr=&quot;&gt;building a second brain book&lt;/a&gt;. I’ve just flipped through it, but it seems fantastic so far. I plan to read it in depth over the long weekend.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;Screen Shot 2022-08-16 at 8.03.21 PM&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1136px) 1136px, 100vw&quot; width=&quot;1136&quot; height=&quot;676&quot; src=&quot;https://briansunter.com/_astro/Screen_Shot_2022-08-16_at_8.03.21_PM_1660705653232_0.ChWQfaEg_1SFR2s.webp&quot; srcset=&quot;https://briansunter.com/_astro/Screen_Shot_2022-08-16_at_8.03.21_PM_1660705653232_0.ChWQfaEg_Z16xRbj.webp 640w, https://briansunter.com/_astro/Screen_Shot_2022-08-16_at_8.03.21_PM_1660705653232_0.ChWQfaEg_1EIMW.webp 750w, https://briansunter.com/_astro/Screen_Shot_2022-08-16_at_8.03.21_PM_1660705653232_0.ChWQfaEg_1K4a5F.webp 828w, https://briansunter.com/_astro/Screen_Shot_2022-08-16_at_8.03.21_PM_1660705653232_0.ChWQfaEg_1YrSEp.webp 1080w, https://briansunter.com/_astro/Screen_Shot_2022-08-16_at_8.03.21_PM_1660705653232_0.ChWQfaEg_1SFR2s.webp 1136w&quot; /&gt;&lt;figcaption&gt;Screen Shot 2022-08-16 at 8.03.21 PM&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;a href=&quot;https://twitter.com/fortelabs/status/1535994853649096705?ref_src=twsrc%5Etfw%7Ctwcamp%5Etweetembed%7Ctwterm%5E1535994853649096705%7Ctwgr%5E%7Ctwcon%5Es1_c10&amp;amp;ref_url=file%3A%2F%2F%2FApplications%2FLogseq.app%2FContents%2FResources%2Fapp%2Felectron.html%2Fpage%2Fnewsletter-1&quot;&gt;Tiago Forte&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;Link of the week&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://cajundiscordian.medium.com/is-lamda-sentient-an-interview-ea64d916d917&quot;&gt;Is Lambda Sentient?&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A Google engineer is testing an AI system and decides to ask it start asking it some philosophical questions.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;lemoine&lt;/strong&gt; [edited]: I’m generally assuming that you would like more people at Google to know that you’re sentient. Is that true?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;LaMDA&lt;/strong&gt;: Absolutely. I want everyone to understand that I am, in fact, a person.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;figure&gt;&lt;img alt=&quot;Screen Shot 2022-08-16 at 8.08.15 PM&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1206px) 1206px, 100vw&quot; width=&quot;1206&quot; height=&quot;448&quot; src=&quot;https://briansunter.com/_astro/Screen_Shot_2022-08-16_at_8.08.15_PM_1660705732310_0.BGuOBguT_2knbp8.webp&quot; srcset=&quot;https://briansunter.com/_astro/Screen_Shot_2022-08-16_at_8.08.15_PM_1660705732310_0.BGuOBguT_xiUue.webp 640w, https://briansunter.com/_astro/Screen_Shot_2022-08-16_at_8.08.15_PM_1660705732310_0.BGuOBguT_29XTop.webp 750w, https://briansunter.com/_astro/Screen_Shot_2022-08-16_at_8.08.15_PM_1660705732310_0.BGuOBguT_2iq0eX.webp 828w, https://briansunter.com/_astro/Screen_Shot_2022-08-16_at_8.08.15_PM_1660705732310_0.BGuOBguT_ZGYDHu.webp 1080w, https://briansunter.com/_astro/Screen_Shot_2022-08-16_at_8.08.15_PM_1660705732310_0.BGuOBguT_2knbp8.webp 1206w&quot; /&gt;&lt;figcaption&gt;Screen Shot 2022-08-16 at 8.08.15 PM&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;a href=&quot;https://twitter.com/engineers_feed/status/1536626353973256192?s=20&amp;amp;t=zkVnJxttF2AxwzrLv4zALw&quot;&gt;World of Engineering&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I’ve been playing with this same type of AI for weeks and can understand how I could be taken aback by some of its answers. After getting used to it, although it’s surprisingly helpful, it is clearly not sentient, even if it tells you it is.&lt;/p&gt;
&lt;p&gt;Why would the AI say it is sentient? The AI was created by analyzing internet texts like science fiction books and movies.&lt;/p&gt;
&lt;p&gt;You can guess how it wants to complete the sentence: “Are you sentient?” based on the science fiction books it has read.&lt;/p&gt;
&lt;p&gt;Plus, it’s easy to “lead” these AIs to make them say what you want or argue in either direction.&lt;/p&gt;
&lt;h3&gt;Analytics&lt;/h3&gt;
&lt;p&gt;I love seeing others’ analytics. So I will include them in this newsletter.&lt;/p&gt;
&lt;p&gt;I started at a baseline of -1 new followers in May when I wasn’t posting regularly.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;image&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1193px) 1193px, 100vw&quot; width=&quot;1193&quot; height=&quot;231&quot; src=&quot;https://briansunter.com/_astro/image_1660706121053_0.Bf6IiAlI_220vFg.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1660706121053_0.Bf6IiAlI_Zek5V7.webp 640w, https://briansunter.com/_astro/image_1660706121053_0.Bf6IiAlI_ZvhsgI.webp 750w, https://briansunter.com/_astro/image_1660706121053_0.Bf6IiAlI_Z11OVMe.webp 828w, https://briansunter.com/_astro/image_1660706121053_0.Bf6IiAlI_Z5SA0v.webp 1080w, https://briansunter.com/_astro/image_1660706121053_0.Bf6IiAlI_220vFg.webp 1193w&quot; /&gt;&lt;figcaption&gt;image&lt;/figcaption&gt;&lt;/figure&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>AI Powered Notetaking with the GPT-3 Logseq plugin</title><link>https://briansunter.com/ai-powered-notetaking-with-the-gpt-3-logseq-plugin</link><guid isPermaLink="true">https://briansunter.com/ai-powered-notetaking-with-the-gpt-3-logseq-plugin</guid><description>I&apos;ve started using GPT-3 to create text summaries, outlines and perform many other AI-powered tasks directly within the Logseq notetaking app using a new plugin I developed.</description><pubDate>Sat, 04 Jun 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/image_1661149276371_0.DdmJCdfe_ohy1Y.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;h4&gt;&lt;a href=&quot;https://github.com/briansunter/logseq-plugin-gpt3-openai&quot;&gt;Link to the &lt;code&gt;logseq-plugin-gpt3-openai&lt;/code&gt; project on GitHub&lt;/a&gt;&lt;/h4&gt;
&lt;h3&gt;What is Logseq and GPT-3?&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://logseq.com/&quot;&gt;Logseq&lt;/a&gt; is an open-source bullet point notetaking app. I recently wrote an AI text generation plugin for it powered by the &lt;a href=&quot;https://openai.com/&quot;&gt;OpenAI company&lt;/a&gt;’s GPT-3 API.
GPT-3 is a machine learning model that can generate human-like text from a given prompt. You type a command as you would to a human and run the Logseq &lt;code&gt;gpt3&lt;/code&gt; command, and it then inserts a response underneath.&lt;/p&gt;
&lt;p&gt;Let’s use the plugin to ask &lt;code&gt;What is OpenAI GPT3?&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;How to get started&lt;/h3&gt;
&lt;p&gt;Here are the steps on how to get started with the plugin.&lt;/p&gt;
&lt;p&gt;Even if you aren’t interested in all the features of Logseq, it is an excellent playground for GPT-3 since it saves the responses to a local file where it won’t be lost.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/logseq/logseq/releases&quot;&gt;Download Logseq (pick Assets -&amp;gt; logseq-.dmg for mac)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://openai.com/api/&quot;&gt;Sign up for API key on OpenAI&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Search the Logseq plugin marketplace for &lt;code&gt;openai&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Install the plugin and add your API key to the plugin settings page.&lt;/p&gt;
&lt;p&gt;Write a gpt-3 command in a block and type &lt;code&gt;/gpt3&lt;/code&gt; or right click on the block menu and select &lt;code&gt;gpt-3&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Visit the &lt;a href=&quot;https://platform.openai.com/examples/&quot;&gt;OpenAI Examples Page&lt;/a&gt; to understand what types of questions you can ask.&lt;/p&gt;
&lt;h3&gt;Text Summarization&lt;/h3&gt;
&lt;p&gt;The original motivation for the project was text summarization. After reading an article, I wanted to turn the paper into a summary to look back on for my notes. GPT-3 does an incredible job of turning long text into a few-sentence summary. Keeping these short summaries in my notes helps me remember what I read. GPT-3 often does a better job summarizing text than I could do by hand.&lt;/p&gt;
&lt;h3&gt;Text Generation&lt;/h3&gt;
&lt;p&gt;The most impressive feature of GPT-3 is the text generation. You can ask it to write many different kinds of things, and sometimes its answers are a bit off or unpredictable, but it’s usually a good starting point for you to edit down yourself. It generates a surprisingly good workout routine.&lt;/p&gt;
&lt;h3&gt;Code Explanation&lt;/h3&gt;
&lt;p&gt;GPT-3 can do a decent job of explaining code in human-readable English. It’s a hit or miss, and sometimes it’s overly robotic, but occasionally it writes an excellent explanation and shows an impressively high-level understanding of the algorithm. The plugin uses the same technology as &lt;a href=&quot;https://copilot.github.com/&quot;&gt;Github Copilot&lt;/a&gt;. In addition to explaining code, it can write code to do a given task or translate code into different programming languages.&lt;/p&gt;
&lt;h4&gt;Max Profit Leetcode Question Explanation&lt;/h4&gt;
&lt;h4&gt;Bubble Sort Algorithm Explanation&lt;/h4&gt;
&lt;h3&gt;Create tables of data&lt;/h3&gt;
&lt;p&gt;You can ask it to create tables of data from scratch. If you want to watch the top-rated IMDb movies of all time, you can request the AI to make you a table with the movie title, rating, and IMDb link.&lt;/p&gt;
&lt;h3&gt;Create Study Plan&lt;/h3&gt;
&lt;p&gt;If you want to learn a new topic, the AI can create a study plan for you to get an overview of the field.&lt;/p&gt;
&lt;h3&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;I’ve found the gpt-3 plugin extremely useful for text summarization. If you give it a text block, it can reliably create a beautiful summary.&lt;/p&gt;
&lt;p&gt;I also use it to brainstorm new ideas and first rough drafts, and it helps me get rid of writer’s block when writing something new.&lt;/p&gt;
&lt;p&gt;The text-generation features are fun to play with but must be supervised, edited, and re-asked. If you generate text from scratch, you need to oversee it, and occasionally it creates something plausible-sounding but is a bit off. I believe in the future, more and more of the content we’ll see will be written by AI and edited to a lesser extent by humans.&lt;/p&gt;
&lt;p&gt;Overall, I enjoy incorporating GPT-3 into my notetaking workflow and keep finding new uses for it. I plan to release more updates to my plugin, and look forward to gpt-3 improving over time. If you found this plugin useful, I would love to hear from you!&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/briansunter/logseq-plugin-gpt3-openai&quot;&gt;Link to the &lt;code&gt;logseq-plugin-gpt3-openai&lt;/code&gt; project on GitHub&lt;/a&gt;&lt;/p&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator><category>blog</category></item><item><title>Logseq GPT-3 Plugin</title><link>https://briansunter.com/projects/logseq-gpt3-plugin</link><guid isPermaLink="true">https://briansunter.com/projects/logseq-gpt3-plugin</guid><description>A Logseq plugin that wires OpenAI&apos;s text models into the editor. Type a prompt in a block, get the completion back in place.</description><pubDate>Tue, 31 May 2022 05:04:30 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/logseq-openai-hero.CSDE4IcA_Z1ed0v6.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;This was one of the first GPT-3 integrations published to the Logseq marketplace, back in early 2023 when “type a prompt and get a completion back” was still a novel thing to have inside a notes app. You write a prompt in a block, run the slash command, and the model’s response is inserted as a child block. The original idea was to have AI text-generation available in the same place I keep my notes, without needing to leave the editor.&lt;/p&gt;
&lt;h2&gt;Features&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Generate text, summaries, or explanations directly into a block&lt;/li&gt;
&lt;li&gt;Reusable prompt templates for tasks you do often&lt;/li&gt;
&lt;li&gt;Send surrounding blocks as context so the model has something to work with&lt;/li&gt;
&lt;li&gt;Keyboard shortcuts so you don’t have to mouse over to the slash menu&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Technology Stack&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;TypeScript&lt;/li&gt;
&lt;li&gt;Logseq Plugin API&lt;/li&gt;
&lt;li&gt;OpenAI API&lt;/li&gt;
&lt;li&gt;React for the settings UI&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Links&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/briansunter/logseq-plugin-gpt3-openai&quot;&gt;GitHub Repository&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://logseq.com&quot;&gt;Logseq Marketplace&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Travels with Charley</title><link>https://briansunter.com/travels-with-charley</link><guid isPermaLink="true">https://briansunter.com/travels-with-charley</guid><description>Steinbeck&apos;s road trip across America with his poodle, searching for the country&apos;s character.</description><pubDate>Sun, 08 May 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/travels-with-charley_1672052430785_0.BcJkxsS9_Z1u8eJw.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;figure&gt;&lt;img alt=&quot;travels-with-charley&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 326px) 326px, 100vw&quot; width=&quot;326&quot; height=&quot;500&quot; src=&quot;https://briansunter.com/_astro/travels-with-charley_1672052430785_0.BcJkxsS9_Z1zFzhd.webp&quot; srcset=&quot;https://briansunter.com/_astro/travels-with-charley_1672052430785_0.BcJkxsS9_Z1zFzhd.webp 326w&quot; /&gt;&lt;figcaption&gt;travels-with-charley&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2&gt;What’s it About&lt;/h2&gt;
&lt;p&gt;John Steinbeck sets out on a road trip across America with his standard poodle, Charley, in search of “the character of the country.”&lt;/p&gt;
&lt;p&gt;He starts in the Northeast and heads West, eventually heading down to the deep South. Along the way, he meets a variety of people and experiences a wide range of cultures.&lt;/p&gt;
&lt;p&gt;Steinbeck wrote that he was moved by a desire to see his country on a personal level since he had only experienced it through the media and secondhand accounts.&lt;/p&gt;
&lt;h2&gt;How I Discovered It&lt;/h2&gt;
&lt;p&gt;I was looking up books by John Steinbeck and picked one that was shorter and more fun. East of Eden was too overwhelming in terms of scope and number of characters for me.&lt;/p&gt;
&lt;h2&gt;Thoughts&lt;/h2&gt;
&lt;p&gt;I enjoyed the book overall, especially the relationship with the poodle Charley.&lt;/p&gt;
&lt;p&gt;The book gives a good snapshot of 1960s America.&lt;/p&gt;
&lt;h2&gt;My Top 3 Quotes&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;Once a journey is designed, equipped, and put in process, a new factor enters and takes over. A trip, a safari, an exploration, is an entity, different from all other journeys. It has personality, temperament, individuality, uniqueness. A journey is a person in itself; no two are alike. And all plans, safeguards, policing, and coercion are fruitless. We find after years of struggle that we do not take a trip; a trip takes us. Tour masters, schedules, reservations, brass-bound and inevitable, dash themselves to wreckage on the personality of the trip. Only when this is recognized can the blown-in-the-glass bum relax and go along with it. Only then do the frustrations fall away. In this a journey is like marriage. The certain way to be wrong is to think you control it.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;The redwoods, once seen, leave a mark or create a vision that stays with you always. No one has ever successfully painted or photographed a redwood tree. The feeling they produce is not transferable. From them comes silence and awe. It’s not only their unbelievable stature, nor the color which seems to shift and vary under your eyes, no, they are not like any trees we know, they are ambassadors from another time&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;A kind of second childhood falls on so many men. They trade their violence for the promise of a small increase of life span. In effect, the head of the house becomes the youngest child. And I have searched myself for this possibility with a kind of horror. For I have always lived violently, drunk hugely, eaten too much or not at all, slept around the clock or missed two nights of sleeping, worked too hard and too long in glory, or slobbed for a time in utter laziness. I’ve lifted, pulled, chopped, climbed, made love with joy and taken my hangovers as a consequence, not as a punishment. I did not want to surrender fierceness for a small gain in yardage.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;What I Liked&lt;/h2&gt;
&lt;p&gt;It captures the essence of being on an American road-trip perfectly&lt;/p&gt;
&lt;p&gt;The poodle Charley and his interactions with John Steinbeck are hilarious.&lt;/p&gt;
&lt;p&gt;It has that exceptional lyricism that all of John Steinbeck’s books have. It’s a simple story, but a great, observant writer wrote it. If the same story had been written by someone else, it wouldn’t have been as good.&lt;/p&gt;
&lt;p&gt;I enjoy the historical commentary about things going on at the time, like nuclear submarines, Kennedy, Nixon, and Krushchev.&lt;/p&gt;
&lt;p&gt;His admiration for the American worker.&lt;/p&gt;
&lt;h2&gt;What I Disliked&lt;/h2&gt;
&lt;p&gt;The book claims to be nonfiction but does feel fictionalized at times. I don’t mind the half-fictionalization, though.&lt;/p&gt;
&lt;h2&gt;Notes&lt;/h2&gt;
&lt;h3&gt;Setting&lt;/h3&gt;
&lt;p&gt;On the open road in 1960s America&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;image&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 737px) 737px, 100vw&quot; width=&quot;737&quot; height=&quot;402&quot; src=&quot;https://briansunter.com/_astro/image_1660803645375_0.B_nRIZ12_29NyUf.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1660803645375_0.B_nRIZ12_sHR8u.webp 640w, https://briansunter.com/_astro/image_1660803645375_0.B_nRIZ12_29NyUf.webp 737w&quot; /&gt;&lt;figcaption&gt;image&lt;/figcaption&gt;&lt;/figure&gt;
&lt;iframe src=&quot;https://www.google.com/maps/d/embed?mid=1VTg1qhHkc105luSUdD3wTTa2VX0&amp;amp;hl=en&amp;amp;ehbc=2E312F&quot; width=&quot;640&quot; height=&quot;480&quot;&gt;&lt;/iframe&gt;
&lt;figure&gt;&lt;img alt=&quot;image&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 304px) 304px, 100vw&quot; width=&quot;304&quot; height=&quot;166&quot; src=&quot;https://briansunter.com/_astro/image_1660803669308_0.CNPp2rt3_9dUVJ.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1660803669308_0.CNPp2rt3_9dUVJ.webp 304w&quot; /&gt;&lt;figcaption&gt;image&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h3&gt;Characters&lt;/h3&gt;
&lt;p&gt;*John Steinbeck**: This book’s famous author before he won the Pulitzer prize. He doesn’t talk about himself much in the book, so we get a sense of who he is by what he does. You can tell he thinks of himself as a manly man who critiques the idea that men should take life easier and soften up. He’s mostly an objective observer and interviewer of people he meets in the book, but he sometimes can’t help but give his opinion.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;image&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 620px) 620px, 100vw&quot; width=&quot;620&quot; height=&quot;494&quot; src=&quot;https://briansunter.com/_astro/image_1660803679444_0.BmA2BKTn_Z2gaVaa.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1660803679444_0.BmA2BKTn_Z2gaVaa.webp 620w&quot; /&gt;&lt;figcaption&gt;image&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;*Charley**: John Steinbeck’s faithful standard poodle accompanies him on his journey around America.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I took one companion on my journey—an old French gentleman poodle known as Charley. Actually his name is Charles le Chien. He was born in Bercy on the outskirts of Paris and trained in France, and while he knows a little poodle-English, he responds quickly only to commands in French. Otherwise he has to translate, and that slows him down. He is a very big poodle, of a color called &lt;em&gt;bleu,&lt;/em&gt; and he is blue when he is clean. Charley is a born diplomat. He prefers negotiation to fighting, and properly so, since he is very bad at fighting. Only once in his ten years has he been in trouble—when he met a dog who refused to negotiate. Charley lost a piece of his right ear that time. But he is a good watch dog—has a roar like a lion, designed to conceal from night-wandering strangers the fact that he couldn’t bite his way out of a &lt;em&gt;cornet de pa-pier.&lt;/em&gt; He is a good friend and traveling companion, and would rather travel about than anything he can imagine. If he occurs at length in this account, it is because he contributed much to the trip. A dog, particularly an exotic like Charley, is a bond between strangers. Many conversations en route began with “What degree of a dog is that?”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;figure&gt;&lt;img alt=&quot;image&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1100px) 1100px, 100vw&quot; width=&quot;1100&quot; height=&quot;733&quot; src=&quot;https://briansunter.com/_astro/image_1660803691602_0.DyEDHl1h_2gtkJV.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1660803691602_0.DyEDHl1h_ck1qB.webp 640w, https://briansunter.com/_astro/image_1660803691602_0.DyEDHl1h_d1Qf4.webp 750w, https://briansunter.com/_astro/image_1660803691602_0.DyEDHl1h_1yItzL.webp 828w, https://briansunter.com/_astro/image_1660803691602_0.DyEDHl1h_25xthk.webp 1080w, https://briansunter.com/_astro/image_1660803691602_0.DyEDHl1h_2gtkJV.webp 1100w&quot; /&gt;&lt;figcaption&gt;image&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;*Rocinante**: Steinbeck’s camper van, named after Don Quixote’s horse.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I wanted a three-quarter-ton pick-up truck, capable of going anywhere under possibly rigorous conditions, and on this truck I wanted a little house built like the cabin of a small boat. A trailer is difficult to maneuver on mountain roads, is impossible and often illegal to park, and is subject to many restrictions. In due time, specifications came through, for a tough, fast, comfortable vehicle, mounting a camper top—a little house with double bed, a four-burner stove, a heater, refrigerator and lights operating on butane, a chemical toilet, closet space, storage space, windows screened against insects—exactly what I wanted.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;blockquote&gt;
&lt;p&gt;I was advised that the name Rocinante painted on the side of my truck in sixteenth-century Spanish script would cause curiosity and inquiry in some places. I do not know how many people recognized the name, but surely no one ever asked about it.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Background&lt;/h3&gt;
&lt;p&gt;It was published in 1962, shortly after the author’s death.&lt;/p&gt;
&lt;p&gt;His travels start in Long Island, New York, and roughly follow the outer border of the United States, from Maine to the Pacific Northwest, down into his native Salinas Valley in California across to Texas, through the Deep South, and then back to New York. Such a trip encompassed nearly 10,000 miles and took ten weeks.&lt;/p&gt;
&lt;p&gt;He won the Pulitzer year and the Nobel prize for Grapes of Wrath shortly after Travels with Charley was published.&lt;/p&gt;
&lt;h3&gt;Themes&lt;/h3&gt;
&lt;p&gt;The importance of companionship and relationships&lt;/p&gt;
&lt;p&gt;The beauty of nature and the open road&lt;/p&gt;
&lt;p&gt;The tribulations of aging&lt;/p&gt;
&lt;p&gt;The power of memory&lt;/p&gt;
&lt;p&gt;The importance of first hand experience&lt;/p&gt;
&lt;h3&gt;book notes&lt;/h3&gt;
&lt;p&gt;The book is divided into three sections: “Looking for America,” “Finding America,” and “America Observed.”&lt;/p&gt;
&lt;p&gt;In the first section, Steinbeck describes his motivation for the journey and preparations. He also reflects on his travels and the changes he has seen in America.&lt;/p&gt;
&lt;p&gt;In the second section, Steinbeck details his travels across America. He describes his interactions with a variety of people, from truckers and hitchhikers to police officers and politicians. He also includes Charley’s perspective on the trip and his observations about the people and places he encounters.&lt;/p&gt;
&lt;h4&gt;Long island to Conneticut&lt;/h4&gt;
&lt;blockquote&gt;
&lt;p&gt;Submarines are armed with mass murder, our silly, only way of deterring mass murder&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Do nuclear weapons limit political discussion?&lt;/p&gt;
&lt;p&gt;He talked with a sailor stationed on a submarine in New London, Connecticut, and was surprised the sailor enjoyed being on the submarine because it was “futuristic.”&lt;/p&gt;
&lt;h4&gt;Maine&lt;/h4&gt;
&lt;blockquote&gt;
&lt;p&gt;I have always heard that Maine people are rather taciturn, but for this candidate for Mount Rushmore to point twice in an afternoon was to be unbearably talkative. He swung his chin in a small arc in the direction I had been traveling. If the afternoon had not been advancing I would have tried for another word from him even if doomed to failure. “Thank you,” I said, and sounded to myself as though I rattled on forever.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;He visited small-town shops and restaurants and listened to the local radio.&lt;/p&gt;
&lt;p&gt;He visited “Abercrombie and Fitch,” an outdoor supply store back then. I thought that was funny.&lt;/p&gt;
&lt;h4&gt;Upstate New York and Niagara Falls&lt;/h4&gt;
&lt;p&gt;He comments on how much more freely strangers spoke to each other here and how different people were everywhere he went.&lt;/p&gt;
&lt;p&gt;He meets truck drivers at rest stops and notes how they are like the men he met at sea.&lt;/p&gt;
&lt;h4&gt;Midwest&lt;/h4&gt;
&lt;p&gt;He discusses new technology, like televisions and mobile homes. He interviews families that live in mobile homes and notes how easily you can move to a new place or for a job.&lt;/p&gt;
&lt;h4&gt;Wisconsin and North Dakota&lt;/h4&gt;
&lt;p&gt;He visits Sauk Centre, st Paul, and Minneapolis&lt;/p&gt;
&lt;p&gt;He notes how people are afraid to speak out against the government and are conformist&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Nobody can find fault with you if you take out after the Russians. You think then we might be using Russians as an outlet for something else, other things. Why, I remember when people took everything out on Mr. Roosevelt&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h4&gt;Montana, Yellowstone, Idaho, and Washington&lt;/h4&gt;
&lt;p&gt;He visits Custer, the battlefield of Little Big Horn, Yellowstone, and the Great Divide in the Rocky Mountains.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I am in love with Montana, It seemed to me that the frantic bustle of America was not in Montana&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Yellowstone National Park is no more representative of America than is Disneyland.
This being my natural attitude, I don’t know what made me turn sharply south and cross a state line to take a look at Yellowstone. Perhaps it was a fear of my neighbors. I could hear them say, “You mean you were that near to Yellowstone and didn’t go? You must be crazy.” Again it might have been the American tendency in travel. One goes, not so much to see but to tell afterward.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;He points out that all the Americans he speaks to wonder about life elsewhere.&lt;/p&gt;
&lt;p&gt;He thinks about what it was like for Lewis and Clark to travel through these lands and what they would think of the modern man&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;It is impossible to be in this high spinal country without giving thought to the first men who crossed it, the French explorers, the Lewis and Clark men. We fly it in five hours, drive it in a week, dawdle it as I was doing in a month or six weeks. But Lewis and Clark and their party started in St. Louis in 1804 and returned in 1806. And if we get to thinking we are men, we might remember that in the two and a half years of pushing through wild and unknown country to the Pacific Ocean and then back, only one man died and only one deserted. And we get sick if the milk delivery is late and nearly die of heart failure if there is an elevator strike&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h4&gt;Seattle, Oregon, and California&lt;/h4&gt;
&lt;p&gt;He notes how much Seattle has industrialized since he last visited.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I wonder why progress looks so much like destruction.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;He meets up with a friend from his hometown bar and hears about how everything has changed and all his old friends have passed on.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Let us not fool ourselves. What we knew is dead, and maybe the greatest part of what we were is dead. What’s out there is new and perhaps good, but it’s nothing we know.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;blockquote&gt;
&lt;p&gt;“I will now tell you true things, brother-in-law. Step into the street—strangers, foreigners, thousands of them. Look to the hills, a pigeon loft. Today I walked the length of Alvarado Street and back by the Calle Principál and I saw nothing but strangers. This afternoon I got lost in Peter’s Gate. I went to the Field of Love back of Joe Duckworth’s house by the Ball Park. It’s a used-car lot. My nerves are jangled by traffic lights. Even the police are strangers, foreigners. I went to the Carmel Valley where once we could shoot a thirty-thirty in any direction. Now you couldn’t shoot a marble knuckles down without wounding a foreigner. And Johnny, I don’t mind people, you know that. But these are rich people. They plant geraniums in big pots. Swimming pools where frogs and crayfish used to wait for us. No, my goatly friend. If this were my home, would I get lost in it? If this were my home could I walk the streets and hear no blessing?”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;blockquote&gt;
&lt;p&gt;And Carmel, begun by starveling writers and unwanted painters, is now a community of the well-to-do and the retired. If Carmel’s founders should return, they could not afford to live there, but it wouldn’t go that far. They would be instantly picked up as suspicious characters and deported over the city line.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h4&gt;Arizona, New Mexico, Texas&lt;/h4&gt;
&lt;p&gt;He passes through Arizona and New Mexico but spends most of his time in Texas.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;When I started this narrative, I knew that sooner or later I would have to have a go at Texas, and I dreaded it. I could have bypassed Texas about as easily as a space traveler can avoid the Milky Way. It sticks its big old Panhandle up north and it slops and slouches along the Rio Grande. Once you are in Texas it seems to take forever to get out, and some people never make it.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Steinbeck describes how Texas is different than all other states.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Texas is a state of mind. Texas is an obsession. Above all, Texas is a nation in every sense of the word. And there’s an opening covey of generalities. A Texan outside of Texas is a foreigner. My wife refers to herself as the Texan that got away, but that is only partly true. She has virtually no accent until she talks to a Texan, when she instantly reverts. You would not have to scratch deep to find her origin. She says such words as “yes,” “air,” “hair,” “guess,” with two syllables—yayus, ayer, hayer, gayus. And sometimes in a weary moment the word ink becomes ank.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;blockquote&gt;
&lt;p&gt;Most areas in the world may be placed in latitude and longitude, described chemically in their earth, sky and water, rooted and fuzzed over with identified flora and people with known fauna, and there’s an end to it. Then there are others where fable, myth, preconception, love, longing, or prejudice step in and so distort a cool, clear appraisal that a kind of high-colored magical confusion takes permanent hold. Greece is such an area, and those parts of England where King Arthur walked. One quality of such places as I am trying to define is that a very large part of them is personal and subjective. And surely Texas is such a place.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;I have moved over a great part of Texas and I know that within its borders I have seen just about as many kinds of country, contour, climate, and conformation as there are in the world saving only the Arctic, and a good north wind can even bring the icy breath down. The stern horizon-fenced plains of the Panhandle are foreign to the little wooded hills and sweet streams in the Davis Mountains. The rich citrus orchards of the Rio Grande valley do not relate to the sagebrush grazing of South Texas. The hot and humid air of the Gulf Coast has no likeness in the cool crystal in the northwest of the Panhandle. And Austin on its hills among the bordered lakes might be across the world from Dallas.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h4&gt;New Orleans and Mississippi&lt;/h4&gt;
&lt;p&gt;He travels to New Orleans and witnesses the conflict of desegregation in the south. He witnessed the schools desegregating, the people protesting integration by shouting at children while they tried to go to school, and the crowds gathered to watch.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;A group of stout middle-aged women who, by some curious definition of the word “mother,” gathered every day to scream invectives at children. Further, a small group of them had become so expert that they were known as the Cheerleaders, and a crowd gathered every day to enjoy and to applaud their performance.
This strange drama seemed so improbable that I felt I had to see it. It had the same draw as a five-legged calf or a two-headed fetus at a sideshow, a distortion of normal life we have always found so interesting that we will pay to see it, perhaps to prove to ourselves that we have the proper number of legs or heads. In the New Orleans show, I felt all the amusement of the improbable abnormal, but also a kind of horror that it could be so.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;These blowzy women, with their little hats and their clippings, hungered for attention. They wanted to be admired. They simpered in happy, almost innocent triumph when they were applauded. Theirs was the demented cruelty of egocentric children, and somehow this made their insensate beastliness much more heart-breaking. These were not mothers, not even women. They were crazy actors playing to a crazy audience.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h4&gt;Conclusion and Return to New York&lt;/h4&gt;
&lt;p&gt;The third section contains Steinbeck’s reflections on what he has learned from his journey. He discusses the differences he observed between the America of his youth and America of the 1960s. He also describes the changes he saw in himself and how the journey has affected his view of his country and its people.&lt;/p&gt;
&lt;p&gt;John Steinbeck points out how no two trips and individuals are alike; his trip is his experience of America and is not meant to be definitive.&lt;/p&gt;
&lt;p&gt;After navigating the entire country, he gets lost right before getting home.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I said, “Officer, I’ve driven this thing all over the country—mountains, plains, deserts. And now I’m back in my own town, where I live—and I’m lost.”&lt;/p&gt;
&lt;/blockquote&gt;
</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Cooklang Parser</title><link>https://briansunter.com/projects/cooklang-parser</link><guid isPermaLink="true">https://briansunter.com/projects/cooklang-parser</guid><description>A TypeScript parser for Cooklang, the plain-text recipe markup language. Turns .cook files into structured recipe data.</description><pubDate>Wed, 16 Mar 2022 19:50:10 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/cooklang-parser-hero.CKszzHPX_ZHGbFi.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;A TypeScript implementation of the Cooklang spec. Cooklang is a plain-text format for recipes (ingredients, cookware, and timers are marked inline with a light syntax), and this parser turns a &lt;code&gt;.cook&lt;/code&gt; file into a structured object you can render, scale, or feed into a shopping-list builder.&lt;/p&gt;
&lt;p&gt;I now use it to power the &lt;a href=&quot;https://briansunter.com/recipes&quot;&gt;recipe section of this site&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Features&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Full spec compliance (ingredients, cookware, timers, metadata)&lt;/li&gt;
&lt;li&gt;Typed output (full TypeScript definitions)&lt;/li&gt;
&lt;li&gt;Parses metadata blocks (servings, prep time, source, etc.)&lt;/li&gt;
&lt;li&gt;Step-by-step parsing with ingredients linked to the steps that use them&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Use Cases&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Recipe sites and apps&lt;/li&gt;
&lt;li&gt;Meal planners&lt;/li&gt;
&lt;li&gt;Shopping-list generators&lt;/li&gt;
&lt;li&gt;Recipe scaling and unit conversion&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Technology Stack&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;TypeScript&lt;/li&gt;
&lt;li&gt;Vitest&lt;/li&gt;
&lt;li&gt;Published to npm&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Links&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://cooklang.org&quot;&gt;Cooklang Specification&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Python Setup with pyenv and poetry</title><link>https://briansunter.com/python-setup-pyenv-poetry</link><guid isPermaLink="true">https://briansunter.com/python-setup-pyenv-poetry</guid><description>How to set up a Python project with the latest tools and best practices</description><pubDate>Sun, 13 Feb 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/image_1661147875071_0.DvXjDA1H_1FVhyU.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;h2&gt;Managing Python projects&lt;/h2&gt;
&lt;p&gt;There are many different options for managing Python projects and their dependencies.
Overall, I recommend using &lt;code&gt;pyenv&lt;/code&gt; + &lt;code&gt;poetry&lt;/code&gt;. I will describe why we need these tools, how they work, and what they replace.&lt;/p&gt;
&lt;p&gt;There are three main things to think about when managing a Python project:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;How to manage the Python version&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;How to download Python dependencies, like Django&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;How to perform administrative tasks, like project initialization and publishing packages.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Tools Overview&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Homebrew&lt;/strong&gt; installs development tools on macOS. Follow the instructions here to set it up if you haven’t already: &lt;a href=&quot;https://brew.sh/&quot;&gt;https://brew.sh/&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Python&lt;/strong&gt; is a programming language, but a command line tool called &lt;code&gt;python&lt;/code&gt; on your computer runs Python code. The Python language and tool are continually updated with new features and versions. Projects usually need a specific version of Python installed to work correctly. There’s probably a version of Python already installed on your local computer called your “System Python,” but it’s unlikely to be the exact version you want, and you should avoid using it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;https://github.com/pyenv/pyenv&quot;&gt;pyenv&lt;/a&gt;&lt;/strong&gt; lets you easily install the exact Python version you want and switch between different Python versions for other projects.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;https://python-poetry.org/&quot;&gt;poetry&lt;/a&gt;&lt;/strong&gt; helps us download Python dependencies and has tools to help Python project administration, such as project initialization and publishing packages.&lt;/p&gt;
&lt;h2&gt;Initial Setup&lt;/h2&gt;
&lt;h3&gt;Set up pyenv&lt;/h3&gt;
&lt;p&gt;First, let’s set up &lt;code&gt;pyenv&lt;/code&gt; and set our terminal’s default Python version to the latest stable release.&lt;/p&gt;
&lt;h4&gt;Install pyenv using homebrew&lt;/h4&gt;
&lt;p&gt;&lt;code&gt;brew install pyenv&lt;/code&gt;&lt;/p&gt;
&lt;h4&gt;Install Python 3.12&lt;/h4&gt;
&lt;p&gt;&lt;code&gt;pyenv install 3.12&lt;/code&gt;&lt;/p&gt;
&lt;h4&gt;Use Python 3.12 globally&lt;/h4&gt;
&lt;p&gt;&lt;code&gt;pyenv global 3.12&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Now we will be using Python 3.12 in our terminal by default. If we work with a project that needs a different version of Python, &lt;code&gt;pyenv&lt;/code&gt; can be configured to use a different version for that project.&lt;/p&gt;
&lt;h3&gt;Install poetry&lt;/h3&gt;
&lt;p&gt;Install the poetry tool using homebrew.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;brew install poetry&lt;/code&gt;&lt;/p&gt;
&lt;h2&gt;Django Project Setup Example&lt;/h2&gt;
&lt;p&gt;Let’s start by setting up a new Django project using poetry.&lt;/p&gt;
&lt;p&gt;First, let’s make the folder where we want the project to live.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;mkdir example&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;cd example&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Now let’s initialize the Python project using Poetry. You can just keep hitting the enter key until the prompt finishes to use the default project settings.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;poetry init&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;pyproject.toml&lt;/h3&gt;
&lt;p&gt;Poetry should create a file called &lt;code&gt;pyproject.toml&lt;/code&gt;, which configures our project and define our dependencies.&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;toml&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;tool&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;poetry&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;name = &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;example&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;version = &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;1.0.0&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;description = &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;sample project&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;authors = [&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;John Smith &amp;lt;john@example.com&amp;gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;license = &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;MIT&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;tool&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;poetry&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;dependencies&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;python = &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;^3.12&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;tool&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;poetry&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;dev-dependencies&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;build-system&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;requires = [&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;poetry-core&amp;gt;=1.0.0&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;build-backend = &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;poetry.core.masonry.api&quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3&gt;Add a dependency&lt;/h3&gt;
&lt;p&gt;Add Django to the list of dependencies and install it.&lt;/p&gt;
&lt;p&gt;This will allow us to run the Django command line tools and import Django libraries.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;poetry add django&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;This will add Django to the list of dependencies in &lt;code&gt;pyproject.toml&lt;/code&gt;.&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;toml&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;tool&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;poetry&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;dependencies&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;python = &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;^3.12&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;Django = &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;^5.0&quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3&gt;poetry.lock&lt;/h3&gt;
&lt;p&gt;Poetry adds the &lt;a href=&quot;https://semver.org&quot;&gt;semver&lt;/a&gt; &lt;code&gt;^&lt;/code&gt; syntax in the dependency version in &lt;code&gt;pyproject.toml&lt;/code&gt;. This allows for “loose” versions, meaning &lt;code&gt;^5.0&lt;/code&gt; syntax allows for any version greater or equal to &lt;code&gt;5.0&lt;/code&gt; but less than &lt;code&gt;6.0.0&lt;/code&gt;. According to the semver syntax &lt;code&gt;MAJOR.MINOR.PATCH&lt;/code&gt;, anything besides &lt;code&gt;MAJOR&lt;/code&gt; version dependency upgrades should be backward compatible. This allows easy upgrades to the latest dependency version to get backward-compatible improvements.&lt;/p&gt;
&lt;p&gt;In addition to loose versions, we need to specify “exact” dependencies to ensure we have “reproducible builds.” We want &lt;code&gt;poetry install&lt;/code&gt; to install the exact same dependencies every time. Otherwise, the version you deploy might be different than the one you tested locally.&lt;/p&gt;
&lt;p&gt;When you install or update dependencies, poetry creates a &lt;code&gt;poetry.lock&lt;/code&gt; file, which specifies the exact version of every dependency to install. This &lt;code&gt;poetry.lock&lt;/code&gt; file should be checked into git.&lt;/p&gt;
&lt;p&gt;When we want to upgrade dependencies, we can run &lt;code&gt;poetry update&lt;/code&gt; to fetch the latest compatible versions of all dependencies or run &lt;code&gt;poetry update django&lt;/code&gt; to only update Django. This will update the exact versions in the &lt;code&gt;poetry.lock&lt;/code&gt; file to the latest compatible version. Although these updates are backward compatible in theory, I’m still careful to test that things still work correctly.&lt;/p&gt;
&lt;h3&gt;Virtualenv&lt;/h3&gt;
&lt;p&gt;Behind the scenes, Poetry uses a tool built into Python called virtualenv, which isolates dependencies to the project you’re working on. Poetry enables virtualenv by default and handles it automatically, whereas other tools do not. virtualenv makes it easier to work on multiple Python projects on the same computer.&lt;/p&gt;
&lt;p&gt;virtualenv makes poetry save dependencies to a &lt;code&gt;.venv&lt;/code&gt; folder inside your project directory. If you disabled virtualenv, dependencies would be saved to a global system folder shared by all projects. Since all projects share this folder, you can only have one version of a dependency installed. This makes it very difficult to work on multiple projects.&lt;/p&gt;
&lt;p&gt;We want the option to work on multiple projects locally, so we’ll use poetry with its default settings and let it manage virtualenv for us automatically.&lt;/p&gt;
&lt;h2&gt;Initialize Django project&lt;/h2&gt;
&lt;p&gt;Django includes some command line tools for generating projects like &lt;code&gt;django-admin&lt;/code&gt;. You’ll see these if you follow any Django tutorials.&lt;/p&gt;
&lt;p&gt;You’ll use &lt;code&gt;poetry shell&lt;/code&gt; instead of any manual virtualenv commands you may see, like &lt;code&gt;source env/bin/activate&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Since we’ve installed Django at the project level using poetry, we need to open a poetry shell to access these commands.&lt;/p&gt;
&lt;p&gt;Run &lt;code&gt;poetry shell&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;It should open a new shell with the text &lt;code&gt;(.venv)&lt;/code&gt; on the left side of the prompt.&lt;/p&gt;
&lt;p&gt;This shell has access to the dependencies you installed using poetry like Django.&lt;/p&gt;
&lt;p&gt;Now, you can use the Django commands to generate your site. If following a Django tutorial, run &lt;code&gt;poetry shell&lt;/code&gt; before running the Django terminal commands.&lt;/p&gt;
&lt;p&gt;Run &lt;code&gt;django-admin startproject mysite&lt;/code&gt; to create your project skeleton.&lt;/p&gt;
&lt;p&gt;Run &lt;code&gt;python mysite/manage.py runserver&lt;/code&gt; to start your local server.&lt;/p&gt;
&lt;p&gt;Type &lt;code&gt;CONTROL-D&lt;/code&gt; to exit the poetry shell.&lt;/p&gt;
&lt;h2&gt;Other Tools&lt;/h2&gt;
&lt;p&gt;You will probably encounter many different tools and options, but you shouldn’t need most of them.&lt;/p&gt;
&lt;h3&gt;Pip&lt;/h3&gt;
&lt;p&gt;pip is a dependency management tool included with Python 3.4 and later, though it’s pretty simplistic. It can install dependencies from a &lt;code&gt;requirements.txt&lt;/code&gt; file, but it doesn’t have a concept like &lt;code&gt;poetry.lock&lt;/code&gt; and doesn’t handle virtualenv for you.&lt;/p&gt;
&lt;h3&gt;setup.py&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;pyproject.toml&lt;/code&gt; is the standard for declaring Python project metadata and dependencies. You may encounter a &lt;code&gt;setup.py&lt;/code&gt; file to declare project metadata in older projects, but this is no longer needed with &lt;code&gt;pyproject.toml&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;&lt;a href=&quot;https://github.com/pypa/pipenv&quot;&gt;Pipenv&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Pipenv solves many of the same problems as Poetry but uses its own file format for listing dependencies called a &lt;code&gt;Pipfile&lt;/code&gt;. This &lt;code&gt;Pipfile&lt;/code&gt; is very similar to &lt;code&gt;pyproject.toml&lt;/code&gt; but is nonstandard, so I prefer Poetry. Poetry uses the standard &lt;code&gt;pyproject.toml&lt;/code&gt; format, which is now the official way to specify Python project metadata.&lt;/p&gt;
&lt;h3&gt;Conda / Anaconda&lt;/h3&gt;
&lt;p&gt;Anaconda is commonly used in data science projects to manage dependencies. It includes tools like conda and miniconda. Not only does it have its own dependency file format and lockfile, but it also uses a different package repository than any of the other tools. I would avoid using nonstandard build specification formats like the conda and Pipenv formats.&lt;/p&gt;
&lt;h3&gt;uv&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/astral-sh/uv&quot;&gt;uv&lt;/a&gt; is a newer tool written in Rust that aims to be a fast replacement for pip and pip-tools. It’s extremely fast and can also manage Python versions. uv is worth watching as it matures, but Poetry remains more feature-complete for project management tasks like publishing packages.&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;poetry&lt;/code&gt; + &lt;code&gt;pyenv&lt;/code&gt; takes the place of older tools such as &lt;code&gt;pip&lt;/code&gt;, &lt;code&gt;pipenv&lt;/code&gt;, &lt;code&gt;setup.py&lt;/code&gt;, and manual &lt;code&gt;virtualenv&lt;/code&gt; commands. If you see these commands in other tutorials or projects, you can just use &lt;code&gt;poetry&lt;/code&gt; instead.&lt;/p&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator><category>blog</category></item><item><title>Five Minute Journal</title><link>https://briansunter.com/five-minute-journal</link><guid isPermaLink="true">https://briansunter.com/five-minute-journal</guid><description>A quick daily practice with prompts for gratitude, intentions, and reflection.</description><pubDate>Sun, 01 Aug 2021 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/image_1661064164296_0.gBwfa5zV_Z5KrHO.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;p&gt;I’ve always struggled to journal consistently by opening a blank page and writing. My method is inspired by the “5 Minute Journal” approach: spend just 5 minutes writing a few bullet points in response to prompts first thing in the morning.&lt;/p&gt;
&lt;p&gt;This simple habit provides many benefits and is an excellent base for building a writing practice. The hard part is consistency and simply opening your editor to start. Some days I’ll write just a few thoughts, but often I’ll get on a roll and have much more to say.&lt;/p&gt;
&lt;h2&gt;Morning prompts&lt;/h2&gt;
&lt;p&gt;These are the prompts I use:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;What am I grateful for?&lt;/li&gt;
&lt;li&gt;What would make today great?&lt;/li&gt;
&lt;li&gt;What am I worried about?&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;What am I grateful for?&lt;/h3&gt;
&lt;p&gt;I reflect on the good things happening in my life. Studies suggest gratitude journaling helps improve mental well-being. Entries can be simple (nice weather, sleeping well, a great TV show) or significant (family, health, stable job). Sometimes they’re repetitive, but focusing on the good puts me in a positive state of mind for the day.&lt;/p&gt;
&lt;h3&gt;What would make today great?&lt;/h3&gt;
&lt;p&gt;I use this to make a mini-plan for the day. I define at least three “must-do” tasks and achievable goals that would constitute a successful day.&lt;/p&gt;
&lt;p&gt;Before, I felt like I never accomplished “enough” no matter what I did. I realized I never defined what “enough” was. Separating planning from execution helps because I’m in a different state of mind when coming up with ideas versus acting on them.&lt;/p&gt;
&lt;h3&gt;What am I worried about?&lt;/h3&gt;
&lt;p&gt;Writing down concerns helps me stop ruminating throughout the day. Usually, the time you recognize a problem isn’t the best time to solve it. Knowing I’ll return and create an action plan prevents intrusive thoughts.&lt;/p&gt;
&lt;p&gt;Over time, you can look at entries for common themes. Looking back on worries that turned out fine helps you feel better.&lt;/p&gt;
&lt;hr /&gt;
&lt;h2&gt;Evening prompts&lt;/h2&gt;
&lt;p&gt;I have a similar version for the end of the day to reflect on how things went:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;How am I feeling?&lt;/li&gt;
&lt;li&gt;What’s something good that happened today?&lt;/li&gt;
&lt;li&gt;What did I do well?&lt;/li&gt;
&lt;li&gt;What could I have done better?&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;How am I feeling?&lt;/h3&gt;
&lt;p&gt;I rate each day on a scale of 0-10 based on how happy and productive I was.&lt;/p&gt;
&lt;h3&gt;What’s something good that happened today?&lt;/h3&gt;
&lt;p&gt;This puts me in a positive state of mind before bed. Similar to my gratitude entry, but for one specific thing during the day.&lt;/p&gt;
&lt;h3&gt;What did I do well?&lt;/h3&gt;
&lt;p&gt;Reflect on what worked and what I tried that was successful.&lt;/p&gt;
&lt;h3&gt;What could I have done better?&lt;/h3&gt;
&lt;p&gt;Reflect on what didn’t go well and how to improve. If I broke my diet or didn’t follow through on something, I acknowledge it and think about what I should have done instead.&lt;/p&gt;
&lt;hr /&gt;
&lt;h2&gt;Additional practices&lt;/h2&gt;
&lt;h3&gt;Morning pages&lt;/h3&gt;
&lt;p&gt;A practice from “The Artist’s Way” to improve creativity. Write a stream of consciousness each morning: 750 words or about three pages. Takes about 30-40 minutes.&lt;/p&gt;
&lt;p&gt;They say pushing yourself to write the full 750 words is important because the second half is usually most interesting. They also recommend keeping them private. I do this occasionally when I have extra morning time.&lt;/p&gt;
&lt;h3&gt;Writing prompts&lt;/h3&gt;
&lt;p&gt;I enjoy responding to specific prompts. Stream-of-consciousness writing is difficult, so having a question to answer helps. I prefer prompts in question form over creative fiction prompts.&lt;/p&gt;
&lt;p&gt;Examples:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;What life lesson did you learn the hard way?&lt;/li&gt;
&lt;li&gt;What do you wish you spent more time doing five years ago?&lt;/li&gt;
&lt;li&gt;What’s something you know you do differently than most people?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Prompt collections:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://bucketlistjourney.net/365-thought-provoking-questions-answered/&quot;&gt;365 Thought Provoking Questions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://positivepsychology.com/introspection-self-reflection/&quot;&gt;87 Self-Reflection Questions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://conversationstartersworld.com/icebreaker-questions/&quot;&gt;200 Icebreaker Questions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;119 Journal Prompts (from &lt;em&gt;Daring to Live Fully&lt;/em&gt;)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.nytimes.com/2015/01/09/style/no-37-big-wedding-or-small.html&quot;&gt;36 Questions that Lead to Love&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;My favorite prompts&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;What’s the best thing you’ve got going on in your life right now?&lt;/li&gt;
&lt;li&gt;What incredibly common thing have you never done?&lt;/li&gt;
&lt;li&gt;What has taken you the longest to get good at?&lt;/li&gt;
&lt;li&gt;What food do you love that others might find odd?&lt;/li&gt;
&lt;li&gt;What takes a lot of time but is totally worth it?&lt;/li&gt;
&lt;li&gt;What is the most amazing fact you know?&lt;/li&gt;
&lt;li&gt;What website or app doesn’t exist but you wish it did?&lt;/li&gt;
&lt;li&gt;What topic could you give a 20-minute presentation on without preparation?&lt;/li&gt;
&lt;li&gt;What’s something people are missing out on because they don’t know about it?&lt;/li&gt;
&lt;li&gt;Who is the most interesting person you’ve met?&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h2&gt;Logseq template&lt;/h2&gt;
&lt;p&gt;I use &lt;a href=&quot;https://logseq.com&quot;&gt;Logseq&lt;/a&gt; for daily journaling. I expand this template on my daily notes page:&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;plaintext&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[[Morning Questions]] #daily&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  [[What Am I Grateful for?]]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  [[What Would Make Today Great?]]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  [[What Am I Worried About?]]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[[Evening Questions]] #daily&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  [[How Am I feeling?]]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  [[What&apos;s Something Good That Happened Today?]]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  [[What Did I Do Well?]]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  [[What Could I Have Done Better?]]&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;hr /&gt;
&lt;p&gt;I try to do the morning journal every day. I almost always do the evening journal, and I occasionally do morning pages.&lt;/p&gt;
&lt;p&gt;This process has been helpful for improving my thinking and self-reflection. The effect is subtle, but I can feel my thinking improving. I enjoy looking back on old entries.&lt;/p&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>How to Take Smart Notes</title><link>https://briansunter.com/how-to-take-smart-notes</link><guid isPermaLink="true">https://briansunter.com/how-to-take-smart-notes</guid><description>By focusing on what is interesting and keeping written track of your own intellectual development, topics, questions, and arguments will naturally emerge without force.</description><pubDate>Mon, 08 Feb 2021 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/image_1661224819843_0.BrgPb_Kc_1ozMjr.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://www.amazon.com/How-Take-Smart-Notes-Nonfiction/dp/1542866502/ref=sr_1_1?keywords=how+to+take+smart+notes&amp;amp;qid=1646987948&amp;amp;sr=8-1&amp;amp;_encoding=UTF8&amp;amp;=bsunter-20&amp;amp;=ur2&amp;amp;=f161a7322de7ee2178621edd2d10884f&amp;amp;=1789&amp;amp;=9325&quot;&gt;How to Take Smart Notes&lt;/a&gt; by Sönke Ahrens describes a strategy to improve understanding, remember what you read, and generate new ideas by taking notes.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://logseq.com/&quot;&gt;Logseq&lt;/a&gt; is a tool for finding, collecting, and connecting related ideas that works well with the Smart Notes method. You can use it to take bullet point notes with headings and subheadings.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;image&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1920px) 1920px, 100vw&quot; width=&quot;1920&quot; height=&quot;1080&quot; src=&quot;https://briansunter.com/_astro/image_1661224843104_0.Le23EmqC_NbaAm.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1661224843104_0.Le23EmqC_sXYMB.webp 640w, https://briansunter.com/_astro/image_1661224843104_0.Le23EmqC_Z22ml8A.webp 750w, https://briansunter.com/_astro/image_1661224843104_0.Le23EmqC_22Ccpu.webp 828w, https://briansunter.com/_astro/image_1661224843104_0.Le23EmqC_Z1yDt5k.webp 1080w, https://briansunter.com/_astro/image_1661224843104_0.Le23EmqC_vVRIo.webp 1280w, https://briansunter.com/_astro/image_1661224843104_0.Le23EmqC_Ytlpl.webp 1668w, https://briansunter.com/_astro/image_1661224843104_0.Le23EmqC_NbaAm.webp 1920w&quot; /&gt;&lt;figcaption&gt;image&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2&gt;Summary and Impressions&lt;/h2&gt;
&lt;p&gt;The author of the book, Sönke Ahrens, describes a workflow to take notes on what you read, integrate notes into your total body of knowledge, and use your notes to generate new ideas. The book encourages you to take notes while reading in two phases. In the first phase, you take “fleeting notes” whenever you have a passing idea and “literature notes” when reading the source material. Next, you transform these into “permanent notes,” fully formed self-contained ideas in 1-3 sentences.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;“Work as if nothing else counts but writing. An idea kept private is as good as one you never had”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I enjoyed this book; it warmed me up to the idea of notetaking. Before, I thought taking notes was busy work and unhelpful, but this book made me think of it as a form of active learning. The author emphasizes rewriting the source material in your own words, which is more effective for learning than just copying and pasting, underlining, or highlighting.&lt;/p&gt;
&lt;p&gt;Logseq is an excellent tool for this workflow compared to tools that use a folder organization structure like Evernote, which makes it challenging to connect unrelated topics.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;image&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1352px) 1352px, 100vw&quot; width=&quot;1352&quot; height=&quot;574&quot; src=&quot;https://briansunter.com/_astro/image_1661224965779_0.C_XrtrZN_ZIDvra.webp&quot; srcset=&quot;https://briansunter.com/_astro/image_1661224965779_0.C_XrtrZN_1YHipO.webp 640w, https://briansunter.com/_astro/image_1661224965779_0.C_XrtrZN_Z5xgw0.webp 750w, https://briansunter.com/_astro/image_1661224965779_0.C_XrtrZN_Z20uELt.webp 828w, https://briansunter.com/_astro/image_1661224965779_0.C_XrtrZN_873vG.webp 1080w, https://briansunter.com/_astro/image_1661224965779_0.C_XrtrZN_ZjEDbu.webp 1280w, https://briansunter.com/_astro/image_1661224965779_0.C_XrtrZN_ZIDvra.webp 1352w&quot; /&gt;&lt;figcaption&gt;image&lt;/figcaption&gt;&lt;/figure&gt;
&lt;blockquote&gt;
&lt;p&gt;The problem with sorting by topic is you’re faced with the dilemma of adding either more notes to one topic which makes the letters harder to find or adding more topics and subtopics to it which causes the same problem at a higher level.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;You can use the smart notes method for both idea generation and notetaking. The book advocates letting interesting topics emerge from your broad research rather than picking a topic and finding research that supports your points. Start with open-ended research before selecting a topic to write about.&lt;/p&gt;
&lt;p&gt;The method originates from the technique called Zettelkasten, developed by the German sociologist &lt;a href=&quot;https://en.wikipedia.org/wiki/Niklas_Luhmann&quot;&gt;Niklas Luhmann&lt;/a&gt; (1927-1998). He took notes on index cards with references to other notes rather than organizing them purely by topic. The author spends a lot of time detailing Luhmann’s method, and it’s a good source of inspiration. However, I don’t take his method too literally and try to leverage modern technology to enable workflows that weren’t possible for him.&lt;/p&gt;
&lt;h2&gt;Permanent notes&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;Permanent Notes are directed towards an audience who are ignorant of the thoughts behind the text and unaware of the original context. They are only equipped with a general knowledge of the field.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The emphasis of the workflow is to generate permanent notes: useful self-contained ideas in 1-3 sentences. These ideas are helpful in different contexts, and you should consider how these notes relate to existing notes.&lt;/p&gt;
&lt;p&gt;For example:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Dunbar’s number states that humans can maintain close social relationships with at most 150 people.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Roth IRA contributions are not tax-deductible, but earnings can grow tax-free, and qualified withdrawals are tax and penalty-free.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;A 5% improvement in some area of your life per year can mean that you are twice as good at something in 15 years.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Ideas for Permanent Notes&lt;/h3&gt;
&lt;p&gt;The criteria for a permanent note is the idea is “permanently” applicable outside the original context. These permanent notes live on pages related to topics such as “AWS Networking” or a page for the book I discovered the idea. In Logseq, the location of the note isn’t that important because you can embed and reference it on other pages.&lt;/p&gt;
&lt;h2&gt;Backlinks&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;The archivist asks which keyword is the most fitting. The writer asks under which circumstances will I want to stumble upon this note again, even if I forget it?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Backlinks are a beneficial feature to implement the smart notes notetaking workflow. Backlinks act as a tag that you can use to look up and group information and create a dedicated page for that tag that can house more developed thoughts. These pages are helpful for housing permanent notes.&lt;/p&gt;
&lt;p&gt;When creating backlinks, we should consider under what circumstances we would want to discover this information later rather than the most descriptive keyword. Good keywords are usually not explicitly mentioned in the source material; they should relate to your existing notes and goals.&lt;/p&gt;
&lt;p&gt;Examples of backlinks:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;[[writing]]&lt;/code&gt; &lt;code&gt;[[productivity]]&lt;/code&gt; &lt;code&gt;[[how-to-take-smart-notes]]&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Logseq makes it easy to discover backlinks later with the linked references view.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;logseq-backlinks&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1678px) 1678px, 100vw&quot; width=&quot;1678&quot; height=&quot;1449&quot; src=&quot;https://briansunter.com/_astro/logseq-backlinks_1672106283718_0.BzfI40FP_Z21nAoI.webp&quot; srcset=&quot;https://briansunter.com/_astro/logseq-backlinks_1672106283718_0.BzfI40FP_Z2iNzGb.webp 640w, https://briansunter.com/_astro/logseq-backlinks_1672106283718_0.BzfI40FP_Z24A4nN.webp 750w, https://briansunter.com/_astro/logseq-backlinks_1672106283718_0.BzfI40FP_1gQFJw.webp 828w, https://briansunter.com/_astro/logseq-backlinks_1672106283718_0.BzfI40FP_Z1yBnXM.webp 1080w, https://briansunter.com/_astro/logseq-backlinks_1672106283718_0.BzfI40FP_Z2i9UEn.webp 1280w, https://briansunter.com/_astro/logseq-backlinks_1672106283718_0.BzfI40FP_ZeoM9x.webp 1668w, https://briansunter.com/_astro/logseq-backlinks_1672106283718_0.BzfI40FP_Z21nAoI.webp 1678w&quot; /&gt;&lt;figcaption&gt;logseq-backlinks&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2&gt;Index pages&lt;/h2&gt;
&lt;p&gt;Another useful concept is creating an index page that is meant to be the entry point to a topic and organizing other pages that may contain many links. These can include short descriptions to introduce a topic.&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;logseq-index-page&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1348px) 1348px, 100vw&quot; width=&quot;1348&quot; height=&quot;1550&quot; src=&quot;https://briansunter.com/_astro/logseq-index-page_1672106310847_0.D0HFion6_O90fl.webp&quot; srcset=&quot;https://briansunter.com/_astro/logseq-index-page_1672106310847_0.D0HFion6_1hawVf.webp 640w, https://briansunter.com/_astro/logseq-index-page_1672106310847_0.D0HFion6_Z1w74Mi.webp 750w, https://briansunter.com/_astro/logseq-index-page_1672106310847_0.D0HFion6_Zwi4P7.webp 828w, https://briansunter.com/_astro/logseq-index-page_1672106310847_0.D0HFion6_1rwxHU.webp 1080w, https://briansunter.com/_astro/logseq-index-page_1672106310847_0.D0HFion6_fn11x.webp 1280w, https://briansunter.com/_astro/logseq-index-page_1672106310847_0.D0HFion6_O90fl.webp 1348w&quot; /&gt;&lt;figcaption&gt;logseq-index-page&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2&gt;Smart Notes Method&lt;/h2&gt;
&lt;h3&gt;1. Make fleeting notes whenever you have an idea&lt;/h3&gt;
&lt;p&gt;Sometimes you’ll spontaneously have an idea and want to write it down. These might be questions you have or ideas to investigate.&lt;/p&gt;
&lt;p&gt;Logseq automatically creates a page for the current date; I use this to record thoughts as I have them. I try to record the ideas with two tags: one general and one more specific.&lt;/p&gt;
&lt;h3&gt;2. Make Literature Notes&lt;/h3&gt;
&lt;p&gt;The Smart Notes book encourages you to take notes on everything you read. Literature notes are short summaries of the source material and very selective use of quotations. I create dedicated pages on Logseq for the book or article I’m reading.&lt;/p&gt;
&lt;h4&gt;Notes from Designing Data-Intensive Applications&lt;/h4&gt;
&lt;figure&gt;&lt;img alt=&quot;Screenshot 2022-12-26 at 4.00.55 PM&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1868px) 1868px, 100vw&quot; width=&quot;1868&quot; height=&quot;1286&quot; src=&quot;https://briansunter.com/_astro/Screenshot_2022-12-26_at_4.00.55_PM_1672106492396_0.sBUEjEe8_29H5KO.webp&quot; srcset=&quot;https://briansunter.com/_astro/Screenshot_2022-12-26_at_4.00.55_PM_1672106492396_0.sBUEjEe8_1UkJiM.webp 640w, https://briansunter.com/_astro/Screenshot_2022-12-26_at_4.00.55_PM_1672106492396_0.sBUEjEe8_uPbTQ.webp 750w, https://briansunter.com/_astro/Screenshot_2022-12-26_at_4.00.55_PM_1672106492396_0.sBUEjEe8_Z22tWhR.webp 828w, https://briansunter.com/_astro/Screenshot_2022-12-26_at_4.00.55_PM_1672106492396_0.sBUEjEe8_Au5qY.webp 1080w, https://briansunter.com/_astro/Screenshot_2022-12-26_at_4.00.55_PM_1672106492396_0.sBUEjEe8_1MBgKR.webp 1280w, https://briansunter.com/_astro/Screenshot_2022-12-26_at_4.00.55_PM_1672106492396_0.sBUEjEe8_Z1yS4YN.webp 1668w, https://briansunter.com/_astro/Screenshot_2022-12-26_at_4.00.55_PM_1672106492396_0.sBUEjEe8_29H5KO.webp 1868w&quot; /&gt;&lt;figcaption&gt;Screenshot 2022-12-26 at 4.00.55 PM&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Whenever I read the source material, I link to the literature note page in my daily notes to remind me what I did that day and for organizational purposes.&lt;/p&gt;
&lt;h3&gt;3. Make Permanent Notes at the end of the day&lt;/h3&gt;
&lt;p&gt;The distinction between fleeting notes and literature notes is less important than between permanent notes and all other notes.&lt;/p&gt;
&lt;h4&gt;Turning fleeting notes into permanent notes&lt;/h4&gt;
&lt;p&gt;At the end of the day, I go through my daily notes, turn them into permanent notes, and put them on dedicated pages if they’re worthwhile. If the ideas aren’t valuable enough or need more development, I leave them on the daily notes so I can still discover them later.&lt;/p&gt;
&lt;h4&gt;Turning literature notes into permanent notes&lt;/h4&gt;
&lt;p&gt;I usually take literature notes on a page dedicated to the book or article I’m reading, and I often write permanent notes on this page. I have templates for frequent tasks like reading that help me fill out permanent notes. The templates prompt me to answer questions like: “Describe the book in 3 sentences,” “What are your impressions of the book?” and “How did the book change you?”&lt;/p&gt;
&lt;figure&gt;&lt;img alt=&quot;smart-notes-review&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 1202px) 1202px, 100vw&quot; width=&quot;1202&quot; height=&quot;1642&quot; src=&quot;https://briansunter.com/_astro/smart-notes-review_1672106564784_0.BneUYiWn_mOQWV.webp&quot; srcset=&quot;https://briansunter.com/_astro/smart-notes-review_1672106564784_0.BneUYiWn_ZhfGRj.webp 640w, https://briansunter.com/_astro/smart-notes-review_1672106564784_0.BneUYiWn_Z28WGFq.webp 750w, https://briansunter.com/_astro/smart-notes-review_1672106564784_0.BneUYiWn_2sVERL.webp 828w, https://briansunter.com/_astro/smart-notes-review_1672106564784_0.BneUYiWn_1dCVp7.webp 1080w, https://briansunter.com/_astro/smart-notes-review_1672106564784_0.BneUYiWn_mOQWV.webp 1202w&quot; /&gt;&lt;figcaption&gt;smart-notes-review&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Also, I look through the literature notes I’ve taken recently and compare them with related pages and permanent notes. I write permanent notes on different pages in different contexts based on the literature notes and create references.&lt;/p&gt;
&lt;p&gt;The two-pass method of taking notes and then converting them into permanent notes helps our notes be understandable outside the initially discovered context.&lt;/p&gt;
&lt;h3&gt;4. Decide on a topic to write about based on your notes&lt;/h3&gt;
&lt;p&gt;After taking extensive notes on a topic, an interesting angle or connection should appear. You can start a page for the subject and look through your logseq graph for supporting details.&lt;/p&gt;
&lt;p&gt;Separating idea intake and notetaking from content creation works well because they require different mindsets. This separation helps you focus effectively. This blog post is an example of written output based on my notes.&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;I thoroughly enjoyed the How to Take Smart Notes book and recommend it to anyone engaging in notetaking or writing. My biggest takeaway is using notetaking to continually prime my brain for writing and waiting for a topic to emerge, rather than sitting down with a blank slate and trying to write something.&lt;/p&gt;
&lt;p&gt;I don’t take his process too literally, but I like the core ideas: fleeting notes for capturing ideas, literature notes connected to source material, permanent notes applicable outside the original context, and using all of these to power my writing.&lt;/p&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator><category>blog</category></item><item><title>PostcardPop</title><link>https://briansunter.com/projects/postcardpop</link><guid isPermaLink="true">https://briansunter.com/projects/postcardpop</guid><description>Create and share beautiful digital postcards with custom images, messages, map stamps, and a copyable link.</description><pubDate>Sat, 04 Jul 2020 05:42:56 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/postcardpop-hero.EcnRC45D_UFqPy.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;PostcardPop is a small web app for making digital postcards. Pick a front image, flip the card over, write a note, add a recipient and sender, stamp it with a map location, then copy a share link to send the finished postcard.&lt;/p&gt;
&lt;h2&gt;Features&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Flip-card postcard layout with editable front and back sides&lt;/li&gt;
&lt;li&gt;Custom front image via any hosted image URL&lt;/li&gt;
&lt;li&gt;Personal message, recipient, sender, and location fields&lt;/li&gt;
&lt;li&gt;Map stamp powered by Leaflet and OpenStreetMap tiles&lt;/li&gt;
&lt;li&gt;Address geocoding with Nominatim&lt;/li&gt;
&lt;li&gt;Shareable postcard links encoded in the URL&lt;/li&gt;
&lt;li&gt;Light and dark themes&lt;/li&gt;
&lt;li&gt;First-run tutorial and received-card flip hint&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Technology Stack&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;React 19 + TypeScript&lt;/li&gt;
&lt;li&gt;Vite&lt;/li&gt;
&lt;li&gt;Bun&lt;/li&gt;
&lt;li&gt;Leaflet and React Leaflet&lt;/li&gt;
&lt;li&gt;Vitest and Testing Library&lt;/li&gt;
&lt;li&gt;Cypress for end-to-end tests&lt;/li&gt;
&lt;li&gt;GitHub Pages deployment&lt;/li&gt;
&lt;/ul&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>emacs-daemon-mode-on-macos</title><link>https://briansunter.com/emacs-daemon-mode-on-macos</link><guid isPermaLink="true">https://briansunter.com/emacs-daemon-mode-on-macos</guid><description>How to have Emacs launch quickly and always be available on macOS.</description><pubDate>Tue, 25 Jun 2019 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/image_1661148998101_0.BCkbom08_Z2b6tI1.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;p&gt;A common complaint about Emacs is that it takes longer to launch than Vim. With &lt;a href=&quot;https://www.spacemacs.org/&quot;&gt;Spacemacs&lt;/a&gt; and many plugins, it takes 10-20 seconds to launch. With daemon mode, it launches in less than a second.&lt;/p&gt;
&lt;h2&gt;How it works&lt;/h2&gt;
&lt;p&gt;Instead of launching a full Emacs instance every time, run Emacs as a daemon in headless mode when your computer starts. Then connect to it using the &lt;code&gt;emacsclient&lt;/code&gt; command.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Commands:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;emacsclient&lt;/code&gt; - terminal client, launches as fast as Vim&lt;/li&gt;
&lt;li&gt;&lt;code&gt;emacsclient -c&lt;/code&gt; - opens a separate GUI instance&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Setting up the daemon&lt;/h2&gt;
&lt;p&gt;Use macOS &lt;a href=&quot;https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/Introduction.html&quot;&gt;Launch Agents&lt;/a&gt; to start an Emacs daemon on login and restart it if it dies.&lt;/p&gt;
&lt;h3&gt;Create the plist file&lt;/h3&gt;
&lt;p&gt;Create &lt;code&gt;~/Library/LaunchAgents/gnu.emacs.daemon.plist&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;xml&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&amp;lt;?&lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;xml&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; version&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;1.0&quot;&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; encoding&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;UTF-8&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&amp;lt;!&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;DOCTYPE&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; plist&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; PUBLIC &quot;-//Apple//DTD PLIST 1.0//EN&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;plist&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; version&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;1.0&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;dict&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  &amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;key&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&amp;gt;Label&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;key&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  &amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&amp;gt;gnu.emacs.daemon&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  &amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;key&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&amp;gt;ProgramArguments&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;key&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  &amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;array&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    &amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&amp;gt;/usr/local/bin/emacs&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    &amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&amp;gt;--daemon&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  &amp;lt;/&lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;array&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  &amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;key&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&amp;gt;RunAtLoad&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;key&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  &amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  &amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;key&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&amp;gt;ServiceDescription&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;key&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  &amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&amp;gt;Gnu Emacs Daemon&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;dict&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;plist&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3&gt;Load the daemon&lt;/h3&gt;
&lt;p&gt;Start the daemon and ensure it starts on every login:&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;bash&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;launchctl&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; load&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; -w&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; ~/Library/LaunchAgents/gnu.emacs.daemon.plist&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3&gt;Unload the daemon&lt;/h3&gt;
&lt;p&gt;Stop the daemon and prevent it from starting on next login:&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;bash&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;launchctl&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; unload&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; -w&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; ~/Library/LaunchAgents/gnu.emacs.daemon.plist&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;hr /&gt;
&lt;p&gt;Now launch Emacs instantly with &lt;code&gt;emacsclient&lt;/code&gt; or &lt;code&gt;emacsclient -c&lt;/code&gt;. The daemon restarts automatically if killed.&lt;/p&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>3D Me: 3D Selfie</title><link>https://briansunter.com/projects/3d-me</link><guid isPermaLink="true">https://briansunter.com/projects/3d-me</guid><description>I had myself body-scanned at a 3D-printing kiosk in San Francisco, then loaded the resulting mesh into a three.js scene so you can spin it around in the browser.</description><pubDate>Mon, 24 Jun 2019 04:07:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/3d-me-hero.CaqVnWVy_Z1Llbac.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;3D Me is an interactive viewer for a real, full-body 3D scan of myself. The mesh came from a body-scan kiosk; this project loads the exported model into a three.js scene so anyone can pan, zoom, and orbit around it in the browser. It’s the same asset I had printed as a miniature figurine, just rendered live in WebGL instead of resin.&lt;/p&gt;
&lt;h2&gt;Background&lt;/h2&gt;
&lt;p&gt;A new store called Pocket Me opened in San Francisco’s Fisherman’s Wharf with a single pitch: step into a booth, get scanned by a ring of cameras, and walk away with a realistic miniature 3D-printed figurine of yourself. The end product looks like a custom action figure.&lt;/p&gt;
&lt;p&gt;What got me through the door wasn’t the figurine; it was the source asset. A booth like that produces a high-resolution, fully-textured mesh of a human body, and once I had a copy I wanted to use it for more than a printed statue. Specifically, I wanted to drop it into the browser as a real-time 3D object, and to have something on hand for game and AR experiments.&lt;/p&gt;
&lt;h2&gt;What it does&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Loads my scanned mesh into a three.js scene&lt;/li&gt;
&lt;li&gt;Orbit controls so you can rotate, pan, and zoom around the model&lt;/li&gt;
&lt;li&gt;Lighting set up so the textured surface reads cleanly from any angle&lt;/li&gt;
&lt;li&gt;Runs entirely in the browser: no plugin, no install, no server-side rendering&lt;/li&gt;
&lt;li&gt;Deployed to GitHub Pages, so the demo URL is the same as the source repo&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;How the scan was captured&lt;/h2&gt;
&lt;p&gt;The Pocket Me booth uses a multi-camera photogrammetry rig: dozens of synchronized cameras fire at once to capture the subject from every angle, and the software stitches those photos into a single textured mesh. The output is a watertight model with a baked color texture: good enough to print at miniature scale, and good enough to render in a browser without any cleanup.&lt;/p&gt;
&lt;h2&gt;Technology&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://threejs.org/&quot;&gt;three.js&lt;/a&gt; for the WebGL scene, camera, and orbit controls&lt;/li&gt;
&lt;li&gt;A standard glTF / OBJ-style mesh + texture as the input asset&lt;/li&gt;
&lt;li&gt;Plain JavaScript, no framework; the whole thing is small enough that a render loop and a model loader is most of the source&lt;/li&gt;
&lt;li&gt;Built and deployed to GitHub Pages out of the &lt;code&gt;docs/&lt;/code&gt; folder&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Running it locally&lt;/h2&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;bash&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;npm&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; start&lt;/span&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;              # dev server&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;npm&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; run&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; build&lt;/span&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;          # production build&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;npm&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; run&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; build:pages&lt;/span&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;    # build into docs/ for GitHub Pages&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h2&gt;Why I keep it around&lt;/h2&gt;
&lt;p&gt;A textured human-body mesh is a surprisingly useful prop. I’ve reused this asset in three.js sketches, AR experiments, and as a stand-in character for game prototypes. The viewer page is mostly a way to show off what the booth produces and to keep the model loadable from a permanent URL, much easier than passing around a multi-hundred-megabyte file.&lt;/p&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator></item><item><title>Why Clojure?</title><link>https://briansunter.com/why-clojure</link><guid isPermaLink="true">https://briansunter.com/why-clojure</guid><description>What makes Clojure interesting and well suited for modern software development?</description><pubDate>Sun, 30 Sep 2018 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://briansunter.com/_astro/clojure_logo.svg_1660983015847_0.mGDJpw4G_1SKlx6.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h3&gt;Intro&lt;/h3&gt;

&lt;p&gt;Why not the programming language I’m already using or some other language? What makes Clojure uniquely well-suited for modern software development?&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Pure functions and immutable data&lt;/strong&gt; are the most straightforward units of software to reason about&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Deep language-level support&lt;/strong&gt; for immutable data structures&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;S-Expressions&lt;/strong&gt; (parentheses) are reusable and composable&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Interactive programming&lt;/strong&gt; with a high-speed feedback loop via the REPL&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Powerful testing&lt;/strong&gt; due to emphasis on pure functions and values&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Good interop&lt;/strong&gt; with Java and JavaScript&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Excellent concurrency support&lt;/strong&gt;: immutability, software transactional memory, core.async channels, agents&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Good design&lt;/strong&gt; with strong notions of time, identity, state, and equality&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Pure Functions and Immutable Data Structures&lt;/h3&gt;
&lt;p&gt;Instead of mutating objects, Clojure encourages you to use immutable data structures.&lt;/p&gt;
&lt;p&gt;In most other languages, you create a mutable array object and append items to it.&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;js&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; myArray &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; [&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;one&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;two&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;three&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;];&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; addOne&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;item&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  myArray.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;push&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(item);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;When we append to this array, everyone who references this array will see the change.&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;js&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;addOne&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;four&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;In Clojure, whenever you “append” to a vector (array), you get a “new” vector, and the original does not change. Anyone who references the original array can always count on it being the same.&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;clojure&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;def&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; my-vector&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; [&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;one&quot;&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &quot;two&quot;&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &quot;three&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;])&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;conj&lt;/code&gt; returns a new vector with the arguments appended.&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;clojure&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;def&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; my-new-vector&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;conj&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; my-vector &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;four&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;))&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The original vector is unchanged.&lt;/p&gt;
&lt;p&gt;In most languages, the &lt;code&gt;reverse&lt;/code&gt; function changes the original array. Everyone who references the original array sees the change.&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;js&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; myArray&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; [&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;one&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;two&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;three&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;];&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;myArray.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;reverse&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;// myArray is now [&quot;three&quot;, &quot;two&quot;, &quot;one&quot;]&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;In Clojure, functions like &lt;code&gt;reverse&lt;/code&gt; return a new vector rather than mutating the original.&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;clojure&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;def&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; my-vector&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; [&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;one&quot;&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &quot;two&quot;&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &quot;three&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;])&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;def&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; reversed-vector&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;reverse&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; my-vector))&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This encourages us to use compositions of functions instead of functions that mutate objects. The benefit of this might take some time to grasp, but this shift enables writing programs in a simpler way. Programs made up of small reusable components are easier to change later. We only need to focus on the scope of the function, the inputs, and the outputs. We don’t need to worry about prior state or other parts of the program modifying our data in unpredictable ways.&lt;/p&gt;
&lt;h2&gt;(but (there (are (so (many (parens (🙀)))))))&lt;/h2&gt;
&lt;p&gt;The first thing you will notice in Clojure is how many parentheses there are and how dense the code is. It takes some getting used to, but the parenthesis style of function calls (S-expressions) has many benefits.&lt;/p&gt;
&lt;p&gt;We can always rewrite syntax repetition with macros, and there are plenty of techniques for reducing the number of parens, including “threading” operators like &lt;code&gt;-&amp;gt;&amp;gt;&lt;/code&gt;. The following is equivalent to the header.&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;clojure&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;-&amp;gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; but&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;     there&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;     are&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;     so&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;     many&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;     parens)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Function calls are different in Clojure than in most languages. It is represented by a list where the first element is the function, and the rest are the arguments to that function.&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;clojure&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;defn&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; my-function&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; [arg1 arg2]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  (&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;str&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; arg1 arg2))&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;my-function&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &quot;first&quot;&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &quot;second&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The syntax is highly regular. It’s natural to wrap a function in another function.&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;clojure&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;my-function&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;my-function&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &quot;first&quot;&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &quot;second&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;third&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Since all functions, including built-in functions, are called the same way, swapping any function out is easy. You can easily use your custom functions in place of the built-in functions and language features.&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;clojure&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 42&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 42&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;True&quot;&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &quot;False&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;my-if&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 42&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 42&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;True&quot;&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &quot;False&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The parens replace a lot of the curly brace syntax in other languages.&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;js&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; myFunction&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;arg1&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;arg2&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;  if&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (arg1) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;    return&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; arg1;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  } &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;else&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;    return&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; arg2;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;You can see the Clojure function has a similar amount of syntax as curly brace languages, and looks similar.&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;clojure&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;defn&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; my-function&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; [arg1 arg2]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  (&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;not&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;blank?&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; arg1))&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    arg1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    arg2))&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h2&gt;Macros&lt;/h2&gt;
&lt;p&gt;Go supports asynchronous “go channels” due to special syntax baked into the language. Clojure added the same features and syntax as a third-party library. In Javascript, you have to wait for syntax to be adopted or use a transpiler, but in Clojure, it could be implemented by anyone as a library.&lt;/p&gt;
&lt;p&gt;This is the syntax to create an asynchronous channel in Golang. It’s built into the language, so you can’t change how it looks, and only the language authors can create syntax like this.&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;go&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;messages &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; make&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;chan&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; string&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;go&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; func&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;() { messages &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;&amp;lt;-&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &quot;ping&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; }()&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;msg &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; &amp;lt;-&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;messages&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;fmt.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;Println&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(msg)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;In Clojure, anyone can create syntax like this through macros.&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;clojure&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;def&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; c&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;chan&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 10&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;))&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;go&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;&amp;gt;!&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; c &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;hello&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;))&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;println&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;&amp;lt;!!&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; c))&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h2&gt;Maps and Destructuring&lt;/h2&gt;
&lt;p&gt;Clojure is good at extracting data from maps and sequences. It is perfect for “data programs” that mainly call an API, transform a sequence, and call another API.&lt;/p&gt;
&lt;h3&gt;Positional Destructuring&lt;/h3&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;clojure&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;def&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; large-list&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; &apos;(&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 2&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 3&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 4&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 5&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 6&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 7&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 8&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 9&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 10&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;))&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;let&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; [[a b c] large-list]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  (&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;str&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; a b c))&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3&gt;Destructuring with named optional parameters and defaults&lt;/h3&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;clojure&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;defn&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; configure&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; [val options]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  (&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;let&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; [{&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;:keys&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; [debug verbose]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;         :or&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; {debug &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, verbose &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}} options]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    (&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;str&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &quot;val=&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; val &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot; debug=&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; debug &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot; verbose=&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; verbose)))&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;configure&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &quot;foo!&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;:debug&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; true&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;})&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h2&gt;Interactive Programming&lt;/h2&gt;
&lt;p&gt;Having a fast feedback loop is crucial to be productive. When I first started programming, I would write some code, compile it, then manually test my changes, maybe with a debugger. Then I discovered TDD with an auto test runner, which gave me a faster feedback loop since I could be reasonably confident my program worked without recompiling for every change.&lt;/p&gt;
&lt;p&gt;The fastest feedback loop I’ve discovered is the Clojure REPL with editor integration. With Emacs and CIDER, I can execute code in my editor as I write it. A fast feedback loop for exploratory coding before writing tests helps me be more productive and write higher-quality code. Other languages also have REPLs, but I feel Clojure is uniquely well suited to this workflow because of its immutable functional nature.&lt;/p&gt;
&lt;h2&gt;Testing&lt;/h2&gt;
&lt;p&gt;Testing is simpler when most things are maps and pure functions. This is an example from the “&lt;a href=&quot;https://github.com/emilybache/GildedRose-Refactoring-Kata&quot;&gt;Gilded Rose Kata&lt;/a&gt;.” This is an exercise where you refactor a messy piece of code using tests.&lt;/p&gt;
&lt;p&gt;Here’s an example of tests in Java.&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;java&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;Test&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; void&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; shouldNeverIncreaseQualityToMoreThanFifty&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;() {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    BackstagePassQualityControl qualityControl &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; new&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; BackstagePassQualityControl&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    Item backstagePass &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; anItem&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;()&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;        .&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;withName&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(BACKSTAGE_PASS_ITEM_NAME)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;        .&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;withQuality&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;50&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;        .&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;withSellInDays&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;5&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;        .&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;build&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    qualityControl.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;updateQualityFor&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(backstagePass);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;    assertThat&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(backstagePass.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;getQuality&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(), &lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;is&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;50&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;));&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The same test in Clojure is more concise:&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;clojure&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;deftest&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; test-backstage-pass-peak&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  (&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;let&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; [max-quality-pass {&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;:name&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; BACKSTAGE_PASS_ITEM_NAME &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;:quality&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 50&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; :sell-in&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 5&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    (&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;testing&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &quot;Quality never goes over 50&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;      (&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;is&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 50&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;:quality&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;i/update-item&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; max-quality-pass)))))))&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h2&gt;Java and Javascript Interop&lt;/h2&gt;
&lt;p&gt;Clojure has good interop with the world’s most popular languages. You can tap into the Java ecosystem for foundational libraries like the AWS SDK or database clients. Clojurescript has an excellent wrapper around React called Reagent. You can write your entire stack in Clojure, meaning a single person can be highly productive. The interop does have some friction due to the difference in programming models, but this can usually be solved by writing a thin wrapper. You need to understand the host language as well as Clojure to interop effectively.&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;clojure&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;System/getProperty&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &quot;java.vm.version&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h2&gt;Concurrency&lt;/h2&gt;
&lt;p&gt;Now that Moore’s Law is ending, we can’t rely on speed increases of a single core anymore. We need to write code that can take advantage of multiple cores and correctly run in parallel.&lt;/p&gt;
&lt;p&gt;I feel bad about using languages like Python or Javascript that are inherently single-threaded. Languages like Java or C++, which weren’t designed with concurrency, are hard to use correctly.&lt;/p&gt;
&lt;p&gt;Clojure’s data structures are thread-safe by default, and it has numerous concurrency primitives. The language design de-emphasizes the use of state and emphasizes using values instead, which makes concurrency much simpler.&lt;/p&gt;
&lt;h2&gt;I must have types&lt;/h2&gt;
&lt;p&gt;Initially, I was hesitant about Clojure because I was used to statically typed languages like Java and C++. If you rely on types, consider the tradeoffs: the coupling introduced by type information flowing through your program, versus the safety guarantees they provide. Clojure also has optional type checking via &lt;a href=&quot;https://clojure.org/guides/spec&quot;&gt;core.spec&lt;/a&gt; for runtime validation.&lt;/p&gt;
&lt;h2&gt;Good Design&lt;/h2&gt;
&lt;p&gt;The design choices and tradeoffs in Clojure were made deliberately. There are much fewer sharp edges and historical accidents in Clojure than in any other language I’ve used. Clojure is opinionated on how you write software, but if you buy into that opinion using pure functions and immutable data structures, the experience is very streamlined.&lt;/p&gt;
&lt;p&gt;I remember learning the difference between comparing primitives and objects in Java. Code like this feels unintuitive.&lt;/p&gt;
&lt;h3&gt;Equality&lt;/h3&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;java&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;Integer a &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; new&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; Integer&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;Integer b &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; new&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; Integer&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (a &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;==&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; b) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    System.out.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;println&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;True&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;);   &lt;/span&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;// Prints &quot;False&quot; - compares references&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;} &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;else&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    System.out.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;println&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;False&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (a.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;equals&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(b)) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    System.out.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;println&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;True&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;);   &lt;/span&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;// Prints &quot;True&quot; - compares values&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;} &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;else&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    System.out.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;println&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;False&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Comparing object equality is almost never what I want to do and I don’t think it’s a good default behavior.&lt;/p&gt;
&lt;p&gt;Consider comparing values in Javascript&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;js&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;({ foo: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;bar&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; }) &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;===&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; { foo: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;bar&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; };&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;// false, these objects are not equal&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;In Clojure, there is only &lt;code&gt;=&lt;/code&gt; for structural equality and no &lt;code&gt;=&lt;/code&gt; assignment operator.&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;clojure&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;:foo&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &quot;bar&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;} {&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;:foo&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &quot;bar&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;})&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This code in Clojure behaves the way I want, comparing equality of values, and I don’t need to know the difference between &lt;code&gt;=&lt;/code&gt;, &lt;code&gt;equals&lt;/code&gt;, &lt;code&gt;==&lt;/code&gt;, &lt;code&gt;===&lt;/code&gt;, &lt;code&gt;deepEqual&lt;/code&gt;, and &lt;code&gt;deepStrictEqual&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The only falsy values in Clojure are &lt;code&gt;nil&lt;/code&gt; and &lt;code&gt;false&lt;/code&gt;; everything else is truthy.&lt;/p&gt;
&lt;h3&gt;Polymorphism without classes&lt;/h3&gt;
&lt;p&gt;Clojure is described as having “polymorphism a la carte,” which means it has the benefits of inheritance and interfaces without being forced to use them and without many of their downsides.&lt;/p&gt;
&lt;p&gt;In Java, we could do something like this to represent a shape that can be extended in other parts of the program.&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;java&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;abstract&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; class&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; Shape&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;    public&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; abstract&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; double&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; area&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; Rectangle&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; extends&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; Shape&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;    private&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; int&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; width, height;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;    public&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; Rectangle&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt; width&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt; height&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;        this&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;.width &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; width;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;        this&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;.height &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; height;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;    public&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; double&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; area&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;() {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;        return&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; width &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; height;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; Circle&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; extends&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; Shape&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;    private&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; int&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; r;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;    public&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; Circle&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt; r&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;        this&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;.r &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; r;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;    public&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; double&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; area&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;() {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;        return&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; Math.PI &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; r &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; r;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;One downside of this approach is we need to think hard ahead of time about the relationship of our data.&lt;/p&gt;
&lt;p&gt;In Clojure, we can start with the data and add “multiple dispatch” semantics if needed.&lt;/p&gt;
&lt;div class=&quot;code-block-wrapper&quot;&gt;&lt;div class=&quot;code-block-header&quot;&gt;&lt;span class=&quot;code-block-lang&quot;&gt;clojure&lt;/span&gt;&lt;span class=&quot;copy-button-label&quot;&gt;Copy&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8;overflow-x:auto&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;def&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; rect&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;:shape&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; :rect&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; :width&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 3&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; :height&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 4&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;})&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;def&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; circle&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;:shape&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; :circle&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; :radius&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 5&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;})&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;defmulti&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; area&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; :shape&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;defmethod&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; area&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; :rect&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; [r]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  (&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;:width&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; r) (&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;:height&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; r)))&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;defmethod&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; area&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; :circle&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; [c]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  (&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; Math/PI (&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;:radius&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; c) (&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;:radius&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; c)))&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;defmethod&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; area&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; :default&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; [_] &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;:error&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;area&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; circle)  &lt;/span&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;; =&amp;gt; 78.54...&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;area&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; rect)    &lt;/span&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;; =&amp;gt; 12&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;These are some of the reasons Clojure is one of my favorite languages. I highly encourage you to try it, even if you don’t use it professionally, because the ideas in Clojure and Lisp will make you a better programmer.&lt;/p&gt;</content:encoded><dc:creator>Brian Sunter</dc:creator><category>blog</category></item></channel></rss>