## Why is Today “Prime Day”?

*July 11, 2017 at 12:21 pm* *
8 comments *

Today is July 11, which the marketing folks at Amazon* have dubbed “Prime Day.” They’ve even created a spiffy, little banner image for it:

Ooh… pretty!

The selection of 7/11 as Prime Day was no doubt deliberate, since both 7 and 11 are prime numbers, though one has to wonder why Amazon ignored the other 52 (or 53, if it’s a leap year) dates they could have chosen:

- February
- 2/2
- 2/3
- 2/5
- 2/7
- 2/11
- 2/13
- 2/17
- 2/19
- 2/23
- 2/29 (some years)

- March
- 3/2
- 3/3
- 3/5
- 3/7
- 3/11
- 3/13
- 3/17
- 3/19
- 3/23
- 3/29
- 3/31

- May
- 5/2
- 5/3
- 5/5
- 5/7
- 5/11
- 5/13
- 5/17
- 5/19
- 5/23
- 5/29
- 5/31

- July
- 7/2
- 7/3
- 7/5
- 7/7
- 7/11
- 7/13
- 7/17
- 7/19
- 7/23
- 7/29
- 7/31

- November
- 11/2
- 11/3
- 11/5
- 11/7
- 11/11
- 11/13
- 11/17
- 11/19
- 11/23
- 11/29

One of my favorite problems is based on the numbers 7 and 11. Here’s a modified version of it, tailored to Amazon’s special day:

An online shopper placed four items in his cart. When he checked out, his credit card was charged $7.11. Shortly thereafter, a programmer realized there was an error in the code, and total price had been calculated by

multiplyingthe prices of the four items. The customer service department was about to alert the customer to the error, but the programmer informed them that the total price would have still been $7.11 if the prices had beenadded. No harm, no foul.There was no sales tax. What was the cost of each item?

Good luck! Happy shopping!

* No, Amazon did not pay me to write a blog post about Prime Day.

Entry filed under: Uncategorized. Tags: Amazon, day, item, prime, shopping.

1.Chris Meador | July 11, 2017 at 8:40 pmI bet a good way to start solving your favorite problem would be to multiply 7.11 by 10^4 to get us into the world of whole numbers.

2.venneblock | July 13, 2017 at 6:45 amWouldn’t multiplying by 10^2 be sufficient?

3.Chris Meador | July 17, 2017 at 10:21 amIf w*x*y*z = 7.11 where each of w,x,y,z might be to two decimal places, we need to multiply all four of them by 10^2 to guarantee whole numbers on the left side of the equation — which means multiplying the right side by 10^8 for balance. As a result, the prime factorization of 7.11 * 10^8 is 2^6 * 3^2 * 5^6 * 79.

With 15 prime factors, that gives us 4^15 ways to assign them to w,x,y,z, and that’s a big number (over one billion). It’s too many for me to do by hand so I asked my computer to test them. Trusty rusty computer only had to try ~5.8 million different arrangements before landing on:

w = 2^3 * 3 * 5 = 120

x = 2^2 * 79 = 316

y = 2 * 3 * 5^2 = 150

z = 5^3 = 125

So, the four prices are $1.20, $3.16, $1.50, and $1.25.

Is there a better way to solve this problem?

4.venneblock | July 27, 2017 at 10:28 amNo doubt, this is a hard problem with lots of checking, but I think there are some efficiencies to be gained.

First, the 4

^{15}number is a significant overestimate, because of repeats. For instance, there are 15 ways to choose four of the six 2’s, and there are 15 ways to choose four of the six 5’s, so that alone would reduce the number of possibilities from over 1 billion to just under 5 million. Still a lot, but there are further reductions, too, since there are also 15 ways to choose two 3’s and two 5’s to make a factor of 225, 120 ways to choose one 2 and three 5’s to make a factor of 250, and so forth.The 79 is a big deal. Since the sum has to be less than 7.11, the 79 can only be used with 2, 3, 4, 5, 6, 8, or 9.

And perhaps the most important thing: since the sum is $7.11, I think it’s safe to assume that the hundredths digit in one of the prices will be 1 or 6. Otherwise, there’d have to be some weird prices like $0.32 and $0.09 to get the hundredths digit of the sum to be a 1.

By no means do I mean to imply that this problem is easy. But I think the amount of searching can be significantly reduced w/o brute force.

5.Xida Ren | July 11, 2017 at 9:22 pmWe’re looking for four numbers that add to 7.11 and multiply to the same. Looking for these numbers in the reals would give us infinitely many answers. Maybe the key lies in the fact that prices are always whole multiples of 0.01 (i.e., in a whole number of cents).

6.venneblock | July 13, 2017 at 6:49 amYeah, you definitely need to consider the real-world aspect of this one to find the (unique) solution.

Go Griffins!

7.Marjan | July 13, 2017 at 8:55 pm🙂 love this blog. I’ve got a few kids working on it…

8.venneblock | July 14, 2017 at 12:41 pmI bet I can guess

whichkids! Good luck to them!