The Two Envelopes of Unknown Numbers

For fans of all other kinds of logic puzzles

The Two Envelopes of Unknown Numbers

Postby rjamil » Sat Jul 04, 2026 5:04 am

Here is a highly deceptive and elegant logic puzzle known as The Two Envelopes of Unknown Numbers. It requires zero complex formulas but completely upends human intuition.

The Scenario

I write down two completely different real numbers on two separate pieces of paper and seal them inside two identical envelopes. The numbers can be absolutely anything—positive, negative, massive whole numbers, or tiny decimals.

You choose one envelope at random and open it. You look at the number inside.

Now, you must guess whether the number in the other envelope is larger or smaller than the one you are currently holding.

The Twist

Intuitively, since you have absolutely no idea what the range or context of the numbers is, your chances of guessing correctly should be exactly 50%. No matter what number you see, the other number feels equally likely to be higher or lower.

The Riddle: Find a reliable strategy that guarantees you a winning probability strictly greater than 50%.

(Take a moment to think about it! The solution relies on a brilliant trick of mathematical probability).

R. Jamil
rjamil
 
Posts: 964
Joined: 15 October 2014
Location: Karachi, Pakistan

Re: The Two Envelopes of Unknown Numbers

Postby m_b_metcalf » Sat Jul 04, 2026 8:13 am

Ah, the "Monty Hall Problem" from "L:et's Make a Deal"!

Mike
User avatar
m_b_metcalf
2017 Supporter
 
Posts: 13747
Joined: 15 May 2006
Location: Berlin

Re: The Two Envelopes of Unknown Numbers

Postby rjamil » Sat Jul 04, 2026 8:34 am

m_b_metcalf wrote:Ah, the "Monty Hall Problem" from "L:et's Make a Deal"!

Mike

Well, the Monty Hall Problem and the Two Envelopes Problem (often called the Two Envelopes Paradox) are fundamentally different. While both explore probability and the counter-intuitive nature of "switching" choices, they deal with entirely different mathematical concepts, assumptions, and logical rules.

A quick breakdown of the differences highlights why they are not the same:

The Monty Hall Problem: A probability puzzle based on a game show where you pick a door (out of 3) to find a car, and the host reveals a "goat" behind one of the other doors.

Core Mechanics: This problem relies on the host's privileged knowledge and specific actions. Switching is highly advantageous because it transfers the accumulated probability of the unchosen doors (which the host was forced to narrow down for you). It has a definitive, proven answer.

The Two Envelopes Problem: A decision theory paradox where you choose between two identical envelopes. You are told one has double the amount of money of the other, but you don't know the starting amounts.

The Two Envelopes Problem: A decision theory paradox where you choose between two identical envelopes. You are told one has double the amount of money of the other, but you don't know the starting amounts

In short: Monty Hall involves using new information revealed by someone who knows where the prize is. Two Envelopes is an exchange paradox where looking inside gives you absolutely no new clues about whether you have the higher or lower amount.

R. Jamil
rjamil
 
Posts: 964
Joined: 15 October 2014
Location: Karachi, Pakistan

Re: The Two Envelopes of Unknown Numbers

Postby Leren » Sat Jul 04, 2026 9:53 am

As I understand it you are describing the Two Envelopes of Unknown Numbers problem and there is no money involved.

I've read a supposed proof of how to devise a strategy to look at the number in the first envelope and guess whether the other envelope has a more positive (or more negative) number than the opened envelope.

The probability of guessing correctly is supposed to be strictly greater than 50%

It looked convincing for a while until I noticed what I think is a fault in the logic.

You can read about the so called "Brilliant" proof here.

If anyone comes up with a "proof" it should make an interesting read.

Leren
Leren
 
Posts: 5228
Joined: 03 June 2012

Re: The Two Envelopes of Unknown Numbers

Postby rjamil » Sat Jul 04, 2026 10:41 am

Leren wrote:It looked convincing for a while until I noticed what I think is a fault in the logic.

Well, there is no fault in the logic. However, I missinterpreted it as The Two Envelopes paradox involving money (always positive numbers), rather than The Two Envelopes of Unknown Numbers (random real numbers).

Let wait for at least 2 days and see if someone will crack the riddle.

R. Jamil
rjamil
 
Posts: 964
Joined: 15 October 2014
Location: Karachi, Pakistan

Re: The Two Envelopes of Unknown Numbers

Postby blue » Sat Jul 04, 2026 5:16 pm

I have a strategy in mind, that should guess correctly 75% of the time.
Does that sound about right ?

Spoilers: Show
Strategy:
If the number is >= 0, guess that the other number is smaller ("more negative").
If the number is < 0, guess that the other number is larger ("more positive").

Probabliity analysis:
1/4 of the time the number in the 1st envelope is positive, and the number in the 2nd envelope is negative -- guess is correct
1/4 of the time the number in the 1st envelope is negative, and the number in the 2nd envelope is positive -- guess is correct
1/4 of the time both numbers are positive -- guess is correct half the time.
1/4 of the time both numbers are negative -- guess is correct half the time.
All in all, guess is correct (1/4)*100+(1/4)*100+(1/4)*50+(1/4)*50 = 75% of the time.
blue
 
Posts: 1109
Joined: 11 March 2013

Re: The Two Envelopes of Unknown Numbers

Postby Leren » Sun Jul 05, 2026 12:25 am

Removed.
Last edited by Leren on Sun Jul 05, 2026 1:09 am, edited 2 times in total.
Leren
 
Posts: 5228
Joined: 03 June 2012

Re: The Two Envelopes of Unknown Numbers

Postby rjamil » Sun Jul 05, 2026 12:58 am

Well, actually blue cracks the riddle quickly [again].

The generic answer of the riddle is define in just three scenarios as follows:

To win more than half the time, you must introduce a random tool of your own to act as a benchmark (or it could simply be 0).

Pick a random number generator that can generate any number on a continuous scale from negative infinity to positive infinity (such as a standard normal distribution curve).
Before you open your envelope, generate a random number. Let's call your random number R.
Open your chosen envelope and look at the number inside. Let's call it X.
Apply this strict rule: If X is smaller than your random number R, guess that the other envelope is larger. If X is larger than R, guess that the other envelope is smaller.

Why This Guarantees a Win

Let's call the two numbers I originally wrote down A (the smaller one) and B (the larger one). When you generate your random number R, there are only three possible places it can land relative to A and B:

Scenario 1 ([R is smaller than both): Your random number lands below A. Regardless of which envelope you open, it will be larger than R. Following the rule, you will guess "smaller". If you opened B, you are right. If you opened A, you are wrong. (50% win rate)

Scenario 2 (R is larger than both): Your random number lands above B. Regardless of which envelope you open, it will be smaller than R. You will guess "larger". If you opened A, you are right. If you opened B, you are wrong. (50% win rate)

Scenario 3 (R falls exactly between them): Your random number lands right in the middle (A < R < B). If you open the smaller envelope A, it is less than R, so you guess "larger" (Correct, because the other is B). If you open the larger envelope B, it is greater than R, so you guess "smaller" (Correct, because the other is A). (100% win rate!)

Because there is always a non-zero statistical chance that your random number R will fall directly between my two numbers, you will win exactly 50% of the time in Scenarios 1 and 2, but 100% of the time in Scenario 3. This mathematically drags your overall odds of winning above 50%.

R. Jamil
rjamil
 
Posts: 964
Joined: 15 October 2014
Location: Karachi, Pakistan

Re: The Two Envelopes of Unknown Numbers

Postby Leren » Sun Jul 05, 2026 1:26 am

Removed.

Leren
Last edited by Leren on Sun Jul 05, 2026 4:04 am, edited 2 times in total.
Leren
 
Posts: 5228
Joined: 03 June 2012

Re: The Two Envelopes of Unknown Numbers

Postby rjamil » Sun Jul 05, 2026 1:51 am

Probability was not invented by a single person, but was formalized in 1654 by French mathematicians Blaise Pascal and Pierre de Fermat. They developed the foundational math of chance through a series of letters trying to solve the "problem of points"—a gambling dispute about fairly dividing stakes in an interrupted dice game.
While Pascal and Fermat laid the mathematical groundwork, the development of probability was an evolving process:

* Early Pioneers: In the 16th century, Italian mathematician and gambler Gerolamo Cardano calculated basic odds for dice games. Arab mathematicians like Al-Kindi also used early statistical and probabilistic inferences for cryptanalysis as early as the 9th century.
* The First Treatise: Dutch mathematician Christiaan Huygens published the first systematic textbook on probability in 1657.
* The Law of Large Numbers: Swiss mathematician Jakob Bernoulli proved the Law of Large Numbers in 1713, giving probability real-world, empirical applications.
* Modern Formalization: Russian mathematician Andrei Kolmogorov unified the field using set theory in 1933, giving us the modern mathematical axioms of probability we use today.

In strict mathematics, choosing a real number "completely at random" across the entire infinite number line is impossible without defining a specific probability distribution (like a Normal distribution or a bounded Uniform distribution).

However, as long as all three numbers are picked independently from the same continuous distribution, their specific values do not matter. The geometric probability will always depend purely on the symmetry of their order, making the answer universally 1/3.

Whereas: the development of Artificial Intelligence (AI) began as a theoretical concept in the mid-20th century and has evolved into the defining technology of the modern era.

Timeline of Key Eras

* The Dawn (1940s–1950s): Alan Turing published the Turing Test in 1950. The term "Artificial Intelligence" was officially coined at the Dartmouth Workshop in 1956.
* First AI Winter (1970s): Initial hype faded. Computational power was too limited, leading governments to cut funding.
* The Boom & Second Winter (1980s): "Expert systems" revived commercial interest, but high maintenance costs caused a second funding collapse.
* The Revival (1990s–2000s): In 1997, IBM's Deep Blue defeated world chess champion Garry Kasparov. AI shifted toward data-driven, practical applications.
* The Deep Learning Explosion (2010s): Affordable GPUs and massive internet data enabled neural networks to excel at image and speech recognition.
* The Generative Era (2020s–Present): Large Language Models (LLMs) and transformer architectures enabled AI to create human-like text, images, and code.

Core Paradigms Shift

* Symbolic AI: Early systems relied on hardcoded "if-then" logic rules.
* Machine Learning: Systems began finding statistical patterns in data without explicit programming.
* Deep Learning: Multi-layered virtual neural networks mimicked human brain structures to learn complex features.
* Generative AI: Modern models map probabilities across billions of parameters to synthesize entirely new data.

R. Jamil
rjamil
 
Posts: 964
Joined: 15 October 2014
Location: Karachi, Pakistan

Re: The Two Envelopes of Unknown Numbers

Postby dobrichev » Sun Jul 05, 2026 9:15 am

I don't understand how it is possible to determine the sign of a number written on a piece of paper of infinite size.
dobrichev
2016 Supporter
 
Posts: 1891
Joined: 24 May 2010

Re: The Two Envelopes of Unknown Numbers

Postby rjamil » Sun Jul 05, 2026 11:28 am

Actually, the riddle is not based on sign or very large number. It could be any two distinct real numbers between -infinity and +infinity.

The riddle is to guess the other number whether smaller or greater than the number visible in your hand.

Added:

dobrichev wrote:... written on a piece of paper of infinite size

The concept of an "infinite canvas" or infinite paper is a foundational idea in digital design and spatial computing. It traces its theoretical roots to comic theorist Scott McCloud in his 2000 book Reinventing Comics, where he envisioned an endless, non-physical workspace to free creators from the limits of printed pages.

Today, this concept is realized through vector rendering engines (such as those in apps like Endless Paper or Concepts) that allow continuous panning and zooming without loss of resolution.

R. Jamil
rjamil
 
Posts: 964
Joined: 15 October 2014
Location: Karachi, Pakistan

Re: The Two Envelopes of Unknown Numbers

Postby Leren » Tue Jul 07, 2026 6:17 am

So what is a short answer to all this ? Well I looked it up and AI provided a lot of information, which I've summarised here.

Call the smaller random envelope number S and the larger envelope number L and your extra random number Z.

Assume the distribution is uniform on some finite interval - X to + X.

Assume S and L and Z are all independently chosen. Also assume that they might be real numbers but truncate them to a few decimal points (no infinite pieces of paper !)

Don't truncate them to integers otherwise the math gets more complicated.

The short answer is that the probability of picking the larger number increases from 1/2 to 2/3.

In the money version of the problem L = 2 * S and the answer is 5/8.

So who gets the credit for this discovery. A couple of mathematicians. 1. TM Cover. 2. D Blackwell, who had published the essential idea in an earlier paper.

And no, AI is not intelligent. There are obviously a lot of people summarising the best information they can at any point in time. Ask the wrong question - even mistype the as three. It's then Garbage in => Garbage out.

Leren
Last edited by Leren on Wed Jul 08, 2026 8:28 pm, edited 1 time in total.
Leren
 
Posts: 5228
Joined: 03 June 2012

Re: The Two Envelopes of Unknown Numbers

Postby rjamil » Tue Jul 07, 2026 2:09 pm

Leren wrote:And no, AI is not intelligent. There are obviously a lot of people summarising the best information they can at any point in time. Ask the wrong question - even mistype the as three. It's then Garbage in => Garbage out.

True. AI is based on both probability and statistics, as the two fields are deeply intertwined.

Statistics provides the tools to look backward at existing data to find patterns.
Probability provides the tools to look forward and make predictions based on those patterns.

To put it simply: Statistics is how the AI builds its map of the world, and probability is how it uses that map to make a guess.

R. Jamil
rjamil
 
Posts: 964
Joined: 15 October 2014
Location: Karachi, Pakistan


Return to Other logic puzzles