<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="https://huzaifahp7.github.io/feed.xml" rel="self" type="application/atom+xml" /><link href="https://huzaifahp7.github.io/" rel="alternate" type="text/html" /><updated>2026-11-12T01:49:05+00:00</updated><id>https://huzaifahp7.github.io/feed.xml</id><title type="html">Huzaifa Pardawala</title><subtitle>Huzaifa Pardawala is an M.S. Computer Science student at Stanford University researching machine learning, NLP, reinforcement learning, efficient inference, and intelligent agents.</subtitle><author><name>Huzaifa Pardawala</name><email>huzaifahp7@gmail.com</email></author><entry><title type="html">Yet Another Fibonacci?</title><link href="https://huzaifahp7.github.io/posts/2025/06/01" rel="alternate" type="text/html" title="Yet Another Fibonacci?" /><published>2025-06-01T00:00:00+00:00</published><updated>2025-06-01T00:00:00+00:00</updated><id>https://huzaifahp7.github.io/posts/2025/06/another-fibonacci</id><content type="html" xml:base="https://huzaifahp7.github.io/posts/2025/06/01"><![CDATA[<h3 id="an-interesting-fibonacci-application-from-102-combinatorial-problems">An interesting Fibonacci Application from <em>102 Combinatorial Problems</em></h3>

<p>The book <em>102 Combinatorial Problems</em> by Titu Andreescu and Zuming Feng is one of my favorites to revise combinatorics for my research work as well as for interview prep.<br />
I came across one of my favorite problems in the book, which is also a beautiful application of the Fibonacci sequence.</p>

<p>The problem states:</p>

<blockquote>
  <p>A set of positive integers has the triangle property if it has three distinct elements that are the lengths of the sides of a triangle whose area is positive.<br />
Consider the set {4, 5, 6, …, n} of consecutive positive integers, all of whose ten-element subsets have the triangle property.<br />
What is the largest possible value of <em>n</em>?</p>
</blockquote>

<hr />

<p>The trick here is to think: “let’s walk backward.”<br />
There is a recursive structure here, but how can one even use it in the first place?</p>

<p>Whenever there is a max or min problem, I tend to think:<br />
<em>“What is the \(n+1^{th}\) element that will make it not true?”</em></p>

<p>If it’s a max problem, you ideally want to find the minimum element that will make it untrue and vice versa.</p>

<p>So now let’s consider the set {4, 5, 6, …, S}, where <em>S</em> is the minimum element where this is first untrue.<br />
Let’s pick an arbitrary subset {s₁, s₂, …, s₁₀} from this set, and let s₁ &lt; s₂ &lt; … &lt; s₁₀.</p>

<p>None of the three-element subsets from this can form a triangle. This is the given problem statement.
Thus, using the property of triangle sides (sum of two sides must always be strictly greater than the third side), we have:</p>

\[S \geq s_{10} \geq s_9 + s_8 \geq (s_8 + s_7) + s_7 \geq \dots\]

<p>Can you now see the recursive structure, where Fibonacci might come into play?</p>

<p>Since it does not satisfy the triangle properties, we have:</p>

\[s_n \geq s_{n-1} + s_{n-2}\]

<p>Using this recursively, we get:</p>

\[S \geq s_{10} \geq s_9 + s_8 \geq (s_8 + s_7) + s_8 = 2s_8 + s_7 \geq 2(s_7 + s_6) + s_7 = 3s_7 + 2s_6 \geq 3(s_6 + s_5) + 2s_6 = 5s_6 + 3s_5 \dots\]

<p>Continuing this way:</p>

\[S \geq 34 s_2 + 21 s_1\]

\[s_1 = 4 \quad \text{and} \quad s_2 = 5\]

<p>Thus:</p>

\[S \geq 34 \times 5 + 21 \times 4 = 254\]

<hr />

<p>254 is the minimum value where this becomes untrue.<br />
Thus, <em>254 - 1 = 253</em> is the maximum number for which this is true.</p>

<hr />

<p>See how the Fibonacci sequence came into play?<br />
The Fibonacci sequence is one of my personal favourite mathematical ideas and usually yields elegant solutions.</p>]]></content><author><name>Huzaifa Pardawala</name><email>huzaifahp7@gmail.com</email></author><category term="combinatorics" /><summary type="html"><![CDATA[An interesting Fibonacci Application from 102 Combinatorial Problems]]></summary></entry><entry><title type="html">Euler-Mascheroni Constant</title><link href="https://huzaifahp7.github.io/posts/2025/06/20/" rel="alternate" type="text/html" title="Euler-Mascheroni Constant" /><published>2025-06-01T00:00:00+00:00</published><updated>2025-06-01T00:00:00+00:00</updated><id>https://huzaifahp7.github.io/posts/2025/06/euler-mascheroni-constant</id><content type="html" xml:base="https://huzaifahp7.github.io/posts/2025/06/20/"><![CDATA[<h3 id="the-euler-mascheroni-constant">The Euler-Mascheroni Constant</h3>

<p>While revisiting the <strong>coupon collector problem</strong>, I came across the <strong>Euler-Mascheroni constant</strong>, denoted by:</p>

\[\gamma \approx 0.57794\ldots\]

<p>This constant appears in various areas of mathematics, especially in number theory and analysis. But how exactly does it arise, and what is its connection to the coupon collecting problem?</p>

<p>[TBD]</p>]]></content><author><name>Huzaifa Pardawala</name><email>huzaifahp7@gmail.com</email></author><category term="mathematics constant" /><summary type="html"><![CDATA[The Euler-Mascheroni Constant]]></summary></entry><entry><title type="html">A Cool Probability Problem</title><link href="https://huzaifahp7.github.io/posts/2025/05/29" rel="alternate" type="text/html" title="A Cool Probability Problem" /><published>2025-05-29T00:00:00+00:00</published><updated>2025-05-29T00:00:00+00:00</updated><id>https://huzaifahp7.github.io/posts/2025/05/probability-random-number</id><content type="html" xml:base="https://huzaifahp7.github.io/posts/2025/05/29"><![CDATA[<h3 id="an-open-ended-question-from-fifty-challenging-problems-in-probability">An Open Ended Question from <em>Fifty Challenging Problems in Probability</em></h3>

<p>The book <em>Fifty Challenging Problems in Probability</em> by Frederick Mosteller is one of my favorites in the subject. The way he describes the solutions is very intuitive, and I would strongly urge you to get a copy if you haven’t already. It’s great for intellectually curious minds, regardless of your technical background (although it does require a basic understanding of certain terms). Mosteller believed that these kinds of “game” problems actually helped him with more serious problems he was working on at the time.</p>

<p>Anyway, on my flight to Chicago, I came across Question 11 in this book, which is open-ended. The problem, rephrased, states:</p>

<blockquote>
  <p>If you and a stranger are separately asked to choose one positive whole number, and told that if you both choose the same number you win, otherwise you lose, which number would you choose? You have no contact with the other person. Just a random guess. Don’t give a long answer.</p>
</blockquote>

<p>In his discussion, Dr. Mosteller mentions that most people are inclined to say “1, 3, 7,” and seldom any two-digit numbers.</p>

<p>So, I asked my friends and family (about 25 of them) independently. Most answered 1 (a great choice indeed); some answered 5 and 7. An interesting response came from two friends who said 10, and one friend who said 25. I had some great discussions with them on the plane based on this (thank you Delta for some great convos in the air). The person who said 25 initially thought there was a range, like 1–100. They were of the opinion that quarters are generally more natural choices, and in this case, 25 is a quarter of 100. This got me thinking: often, when a problem is unbounded, we resort to the most trivial answer, but what if a range or bound is given? How do we rationalize our choices? What if we increased the range—would we be inclined to say 500 in that case?</p>

<p>A few friends who said 7 thought it was mathematically a very “pretty” answer and assumed the other person would think so as well. A friend of mine was of the opinion that this is a psychological rather than a mathematical problem, due to the biases that affect your answers and what you think of the other person’s mathematical reasoning abilities. Thus, your answer could say a lot about your thought process. This sparked a great discussion, and I was of the opinion that if we were to statistically estimate the best answer, it should have just been the trivial 1.</p>

<p>Anyway, it’s a great read, and the other problems in the book are equally exciting. A thin booklet, but truly a treasure of knowledge.</p>]]></content><author><name>Huzaifa Pardawala</name><email>huzaifahp7@gmail.com</email></author><category term="probability" /><summary type="html"><![CDATA[An Open Ended Question from Fifty Challenging Problems in Probability]]></summary></entry></feed>