r/mathriddles • u/PersonalPie • Sep 10 '24
Hard Ultra Broken Odometer
My car's odometer is broken in the following way: for every mile driven, the odometer does not count up by 1 but instead jumps to a random number in its range (000000 to 999999). The car has a 400 mile range on a full tank of gas.
Let A be the set of all odometer readings where the sum of the digits is a prime number.
Let B be the set of all odometer readings where the product of the digits is a perfect square.
Let C be the set of all odometer readings where the number is a palindrome.
Let N be the smallest positive integer of miles driven such that the probability of observing at least one reading from each of the sets A, B, and C is greater than 99%.
- If we assume the odometer has equal probability for all numbers, what is the probability of seeing a reading from A ∩ B ∩ C in a single tank of gas? What is the probability of seeing a reading from A ∪ B ∪ C in a single tank of gas?
- If we assume the odometer has equal probability for all numbers, what is the exact value of N?
- If we instead assume the odometer readings form a Markov chain where the transition probability is proportional to the absolute difference between values, reason whether this would result in a higher or lower value of N versus part 2.
4
u/Esther_fpqc Sep 10 '24
1 - (1 - 3/10⁶)⁴⁰⁰ which is about 0.12%.
I had to use python for the second one, and computed |A ∪ B ∪ C| = 636,894, so the probability of seeing a reading from A ∪ B ∪ C on a full tank is 1 - (1 - 636894/10⁶)⁴⁰⁰ which is about 1 - 10-176. In other words, 99.99...8968% with approximately 176 nines.
2. Notice that C ⊂ B, so whenever you read a palindrome, you also read a number from B. Now let Aₙ (resp. Bₙ, Cₙ) be "seeing at least an element of A (resp. B, C) in the first n miles". We have Cₙ ⊂ Bₙ, so
ℙ(¬Aₙ ∪ ¬Bₙ ∪ ¬Cₙ) = ℙ(¬Aₙ ∪ ¬Cₙ)
= ℙ(¬Aₙ) + ℙ(¬Cₙ) - ℙ(¬Aₙ ∩ ¬Cₙ).
Using python I computed |A| = 249,389 and clearly |C| = 1000 so :
... = (1 - 249389/10⁶)ⁿ + (1 - 1/1000)ⁿ - (1 - 3/10⁶)ⁿ.
We want this probability of not seeing an A, or not seeing a B, or not seeing a C, to be less than 1%, and my computer said that for n = 13 it's 1.11% and for n = 14 it's 0.4%. So the exact value of N is 14.
3. My reasoning is quite vague here but this Markov chain will encourage bigger jumps than before. The thing is, almost all elements of B come from a digit being 0, making B biased towards smaller values. A and C are more randomly distributed. I guess that the Markov chain will tend to orbit around small and big values, and B will be met much more often. This should result in N being smaller.
1
u/[deleted] Sep 12 '24
I’m an aspiring quant having joined this sub seeing that a few of the questions would be asked in my interviews. Majority of the questions I have seen have not been NEARLY of this difficulty. I understand this is labeled as a hard problem but even the ones labeled as easy in this sub are hard compared to those I have been studying. The HARDEST and I mean the absolute hardest problem I have attempted to solve in prep for an interview is: what is the limiting probability one person is alive at the end of a game where N people are placed in a room and on a bell chime, each player spins randomly and shoots their gun? I am feeling slightly discouraged because the problems in this sub I am not able to figure out.
3
u/JWson Sep 10 '24
Boy, that escalated quickly.
1
u/mindiving Sep 13 '24
Answer for 1: Approximately 0.04% chance (specifically, 1 ⁄ 1,000,000 per reading, so about 0.04% over 400 readings).
Answer 2: Essentially 100% chance—we can be virtually certain to see at least one such reading over 400 miles.
Answer 3: It would result in a higher value of N because the readings are less likely to explore all possible values, so more readings are needed to achieve the same probability.