<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Mathematics on Rafiul Alam</title>
    <link>https://alamrafiul.com/categories/mathematics/</link>
    <description>Recent content in Mathematics on Rafiul Alam</description>
    <image>
      <title>Rafiul Alam</title>
      <url>https://alamrafiul.com/papermod-cover.png</url>
      <link>https://alamrafiul.com/papermod-cover.png</link>
    </image>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Sun, 02 Feb 2025 00:00:00 +0000</lastBuildDate><atom:link href="https://alamrafiul.com/categories/mathematics/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Go Concurrency Pattern: The Sieve of Eratosthenes Pipeline</title>
      <link>https://alamrafiul.com/posts/go-sieve-eratosthenes/</link>
      <pubDate>Sun, 02 Feb 2025 00:00:00 +0000</pubDate>
      
      <guid>https://alamrafiul.com/posts/go-sieve-eratosthenes/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://alamrafiul.com/posts/go-monte-carlo-pi/&#34;&gt;← Monte Carlo Pi&lt;/a&gt; | &lt;a href=&#34;https://alamrafiul.com/concurrency-patterns/&#34;&gt;Series Overview&lt;/a&gt; | &lt;a href=&#34;https://alamrafiul.com/posts/go-mandelbrot-set/&#34;&gt;Mandelbrot Set →&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&#34;the-problem-finding-primes-with-filters&#34;&gt;The Problem: Finding Primes with Filters&lt;/h2&gt;
&lt;p&gt;The Sieve of Eratosthenes is an ancient algorithm for finding prime numbers. The concurrent version creates a pipeline of filters: each prime spawns a goroutine that filters out its multiples.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Algorithm:&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Generate sequence: 2, 3, 4, 5, 6, 7, 8, 9, 10, &amp;hellip;&lt;/li&gt;
&lt;li&gt;Take first number (2), it&amp;rsquo;s prime, filter all multiples of 2&lt;/li&gt;
&lt;li&gt;Take next number (3), it&amp;rsquo;s prime, filter all multiples of 3&lt;/li&gt;
&lt;li&gt;Take next number (5), it&amp;rsquo;s prime, filter all multiples of 5&lt;/li&gt;
&lt;li&gt;Repeat until desired count&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;The Beauty:&lt;/strong&gt; Each prime creates its own filter. Numbers flow through a pipeline of increasingly selective filters. What passes through all filters must be prime.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Go Concurrency Pattern: Monte Carlo Pi Estimation</title>
      <link>https://alamrafiul.com/posts/go-monte-carlo-pi/</link>
      <pubDate>Thu, 30 Jan 2025 00:00:00 +0000</pubDate>
      
      <guid>https://alamrafiul.com/posts/go-monte-carlo-pi/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://alamrafiul.com/posts/go-login-counter/&#34;&gt;← Login Counter&lt;/a&gt; | &lt;a href=&#34;https://alamrafiul.com/concurrency-patterns/&#34;&gt;Series Overview&lt;/a&gt; | &lt;a href=&#34;https://alamrafiul.com/posts/go-sieve-eratosthenes/&#34;&gt;Sieve of Eratosthenes →&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&#34;the-problem-computing-pi-by-throwing-darts&#34;&gt;The Problem: Computing Pi by Throwing Darts&lt;/h2&gt;
&lt;p&gt;Imagine a square dartboard with a circle inscribed inside it. Throw random darts at the square. The ratio of darts landing inside the circle to total darts thrown approaches π/4.&lt;/p&gt;
&lt;p&gt;Why? &lt;strong&gt;Mathematics:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Square side length: 2 (from -1 to 1)&lt;/li&gt;
&lt;li&gt;Square area: 4&lt;/li&gt;
&lt;li&gt;Circle radius: 1&lt;/li&gt;
&lt;li&gt;Circle area: π × 1² = π&lt;/li&gt;
&lt;li&gt;Ratio: π/4&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Throw 1 million darts, multiply by 4, and you&amp;rsquo;ve estimated π. More darts = better estimate. This is &lt;strong&gt;Monte Carlo simulation&lt;/strong&gt;: using randomness to solve deterministic problems.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Go Concurrency Pattern: The Mandelbrot Set</title>
      <link>https://alamrafiul.com/posts/go-mandelbrot-set/</link>
      <pubDate>Mon, 27 Jan 2025 00:00:00 +0000</pubDate>
      
      <guid>https://alamrafiul.com/posts/go-mandelbrot-set/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://alamrafiul.com/posts/go-sieve-eratosthenes/&#34;&gt;← Sieve of Eratosthenes&lt;/a&gt; | &lt;a href=&#34;https://alamrafiul.com/concurrency-patterns/&#34;&gt;Series Overview&lt;/a&gt; | &lt;a href=&#34;https://alamrafiul.com/posts/go-collatz-explorer/&#34;&gt;Collatz Explorer →&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&#34;the-problem-rendering-fractals-in-parallel&#34;&gt;The Problem: Rendering Fractals in Parallel&lt;/h2&gt;
&lt;p&gt;The Mandelbrot set is defined by a simple iterative formula:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Start with &lt;code&gt;z = 0&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Repeatedly compute &lt;code&gt;z = z² + c&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;If &lt;code&gt;|z|&lt;/code&gt; exceeds 2, the point escapes (not in the set)&lt;/li&gt;
&lt;li&gt;Color each pixel by iteration count&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;The beauty:&lt;/strong&gt; Each pixel is completely independent. Perfect for parallelism!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The challenge:&lt;/strong&gt; Some pixels escape in 5 iterations, others take 1000+. This creates &lt;strong&gt;load imbalance&lt;/strong&gt;-some workers finish instantly while others grind away.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Mixed Strategies: Why You Should Be Unpredictable</title>
      <link>https://alamrafiul.com/blogs/mixed-strategies-why-be-unpredictable/</link>
      <pubDate>Thu, 23 Jan 2025 00:00:00 +0000</pubDate>
      
      <guid>https://alamrafiul.com/blogs/mixed-strategies-why-be-unpredictable/</guid>
      <description>&lt;h1 id=&#34;mixed-strategies-why-you-should-be-unpredictable&#34;&gt;Mixed Strategies: Why You Should Be Unpredictable&lt;/h1&gt;
&lt;p&gt;You&amp;rsquo;ve learned about dominant strategies and Nash equilibria in pure strategies. But what happens when there&amp;rsquo;s no pure strategy Nash equilibrium? What if being predictable is your worst enemy?&lt;/p&gt;
&lt;p&gt;Welcome to the world of &lt;strong&gt;mixed strategies&lt;/strong&gt; - where randomness becomes your most powerful weapon.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&#34;the-problem-with-being-predictable&#34;&gt;The Problem with Being Predictable&lt;/h2&gt;
&lt;p&gt;Imagine you&amp;rsquo;re a goalkeeper facing a penalty kick. You can dive left or right. The striker can shoot left or right. If you both go the same way, the striker scores. If you guess correctly, you save.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Nash Equilibrium Explained in 5 Minutes</title>
      <link>https://alamrafiul.com/blogs/nash-equilibrium-explained-five-minutes/</link>
      <pubDate>Wed, 22 Jan 2025 00:00:00 +0000</pubDate>
      
      <guid>https://alamrafiul.com/blogs/nash-equilibrium-explained-five-minutes/</guid>
      <description>&lt;p&gt;John Nash won the Nobel Prize for an idea so simple you can explain it in 5 minutes. Yet this idea revolutionized economics, predicted Cold War outcomes, explains why you&amp;rsquo;re stuck in traffic, and even helps explain evolution.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s understand Nash Equilibrium-the most important concept in game theory.&lt;/p&gt;
&lt;h2 id=&#34;the-core-idea-in-one-sentence&#34;&gt;The Core Idea (In One Sentence)&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;A Nash Equilibrium is a situation where no player can improve their outcome by changing their strategy alone-everyone is doing the best they can given what everyone else is doing.&lt;/strong&gt;&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>What is Game Theory? A Simple Introduction</title>
      <link>https://alamrafiul.com/blogs/what-is-game-theory-simple-intro/</link>
      <pubDate>Wed, 22 Jan 2025 00:00:00 +0000</pubDate>
      
      <guid>https://alamrafiul.com/blogs/what-is-game-theory-simple-intro/</guid>
      <description>&lt;p&gt;Have you ever wondered why gas stations on the same corner charge similar prices? Or why countries engage in arms races even though both would be better off spending less on weapons? Or why you and your friends can&amp;rsquo;t decide where to eat, even though everyone wants to go somewhere?&lt;/p&gt;
&lt;p&gt;These situations all involve strategic decision-making-and that&amp;rsquo;s exactly what game theory studies.&lt;/p&gt;
&lt;h2 id=&#34;what-is-game-theory&#34;&gt;What is Game Theory?&lt;/h2&gt;
&lt;p&gt;Game theory is the mathematical study of strategic interactions. It&amp;rsquo;s a framework for understanding situations where your best choice depends on what others choose, and their best choice depends on what you choose.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Game Theory 101: What is a &#39;game&#39; in mathematics?</title>
      <link>https://alamrafiul.com/blogs/game-theory-101-what-is-a-game/</link>
      <pubDate>Tue, 21 Jan 2025 00:00:00 +0000</pubDate>
      
      <guid>https://alamrafiul.com/blogs/game-theory-101-what-is-a-game/</guid>
      <description>&lt;p&gt;When most people hear the word &amp;ldquo;game,&amp;rdquo; they think of fun activities like chess, poker, or video games. But in mathematics, a &amp;ldquo;game&amp;rdquo; has a much broader and more precise meaning. Game theory studies strategic situations where the outcome depends not just on your choices, but on the choices of others too.&lt;/p&gt;
&lt;h2 id=&#34;what-makes-something-a-game&#34;&gt;What Makes Something a &amp;ldquo;Game&amp;rdquo;?&lt;/h2&gt;
&lt;p&gt;In game theory, a game is any situation where:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Multiple decision-makers&lt;/strong&gt; (called &amp;ldquo;players&amp;rdquo;) interact&lt;/li&gt;
&lt;li&gt;Each player has &lt;strong&gt;choices&lt;/strong&gt; (called &amp;ldquo;strategies&amp;rdquo;) they can make&lt;/li&gt;
&lt;li&gt;Each combination of choices leads to an &lt;strong&gt;outcome&lt;/strong&gt; with specific rewards or costs (called &amp;ldquo;payoffs&amp;rdquo;)&lt;/li&gt;
&lt;li&gt;Players care about these outcomes and try to make &lt;strong&gt;rational decisions&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The beauty of this definition is that it applies to far more than board games. Business competition, political negotiations, evolutionary biology, and even social dilemmas are all &amp;ldquo;games&amp;rdquo; in the mathematical sense.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Payoff Matrices: How to visualize any two-player game</title>
      <link>https://alamrafiul.com/blogs/payoff-matrices-visualize-two-player-games/</link>
      <pubDate>Tue, 21 Jan 2025 00:00:00 +0000</pubDate>
      
      <guid>https://alamrafiul.com/blogs/payoff-matrices-visualize-two-player-games/</guid>
      <description>&lt;p&gt;If you want to master game theory, you need to master payoff matrices. They&amp;rsquo;re the single most important tool for analyzing two-player games, and once you understand them, you&amp;rsquo;ll see strategic situations everywhere.&lt;/p&gt;
&lt;p&gt;A payoff matrix is simply a table that shows every possible outcome of a game and what each player gets in each scenario. But this simple visualization unlocks powerful insights about human behavior, business strategy, and why rational people sometimes make seemingly irrational choices.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Why Rational Players Sometimes Lose: The Paradox of Game Theory</title>
      <link>https://alamrafiul.com/blogs/rational-players-paradox-game-theory/</link>
      <pubDate>Tue, 21 Jan 2025 00:00:00 +0000</pubDate>
      
      <guid>https://alamrafiul.com/blogs/rational-players-paradox-game-theory/</guid>
      <description>&lt;p&gt;Here&amp;rsquo;s one of the most unsettling discoveries in mathematics: perfectly rational players, each acting in their own self-interest, can all end up worse off than if they had acted irrationally. This isn&amp;rsquo;t a flaw in game theory-it&amp;rsquo;s a feature of reality that game theory reveals.&lt;/p&gt;
&lt;p&gt;This paradox explains traffic jams, arms races, overfishing, climate change negotiations, and why businesses sometimes engage in destructive price wars. Understanding it will change how you see human cooperation (and its failures).&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Go Concurrency Pattern: The Collatz Explorer</title>
      <link>https://alamrafiul.com/posts/go-collatz-explorer/</link>
      <pubDate>Mon, 20 Jan 2025 00:00:00 +0000</pubDate>
      
      <guid>https://alamrafiul.com/posts/go-collatz-explorer/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://alamrafiul.com/posts/go-mandelbrot-set/&#34;&gt;← Mandelbrot Set&lt;/a&gt; | &lt;a href=&#34;https://alamrafiul.com/concurrency-patterns/&#34;&gt;Series Overview&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&#34;the-problem-the-simplest-unsolved-math-problem&#34;&gt;The Problem: The Simplest Unsolved Math Problem&lt;/h2&gt;
&lt;p&gt;The Collatz conjecture (3n+1 problem) is deceptively simple:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Start with any positive integer n&lt;/li&gt;
&lt;li&gt;If n is even: divide by 2&lt;/li&gt;
&lt;li&gt;If n is odd: multiply by 3 and add 1&lt;/li&gt;
&lt;li&gt;Repeat until you reach 1&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;The conjecture:&lt;/strong&gt; Every positive integer eventually reaches 1.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Example (n=12):&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;12 → 6 → 3 → 10 → 5 → 16 → 8 → 4 → 2 → 1
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;strong&gt;The mystery:&lt;/strong&gt; This has been verified for numbers up to 2^68, but never proven. It&amp;rsquo;s one of mathematics&amp;rsquo; most famous unsolved problems.&lt;/p&gt;</description>
    </item>
    
  </channel>
</rss>
