A bus ticket has 4 numbers, and ranges from 0000 to 9999. It is considered lucky if the sum of the first 2 numbers equals the sum of the last two numbers. How many lucky tickets are there?
-
This question has been reposted from Brilliant. I request that Quora users do not post their solutions till July 31 - Calvin Lin, Brilliant Challenge Master. Clarification: Bus tickets can start with the number 0. The bus ticket 0000 is a lucky ticket.
-
Answer:
The highest sum you get for the first 2 numbers is 18 (9+9). The next highest is 17, which can be formed from 9+8,8+9. The 3rd highest is obviously 16, which can be formed by 9+7, 8+8,7+9. Similarly 15 can be formed by 9+6, 8+7, 7+8, 6+9. We wish to find how many ways we can find such sums for an integer0⩽x⩽180⩽x⩽180 \leqslant x \leqslant 18. Notice that xxx and 18âx18âx18-x have the same answer since for each combination a+ba+ba+b there is the combination (9âa)+(9âb)(9âa)+(9âb) (9-a)+(9-b) (which makes since because all summands must be at most 9). Also, we are guaranteed there are no more combinations of 18âx18âx18-x since if there was (say, c+dc+dc+d), then (9âc)+(9âd)\eq18â(c+d)\eq18â(18âx)\eqx(9âc)+(9âd)\eq18â(c+d)\eq18â(18âx)\eqx(9-c)+(9-d) \eq 18-(c+d) \eq 18-(18-x) \eq x . So without a loss of generality we can let xxx be at least 9. As you can see from the example in the beginning, all of the combinations can be organized by the first summand. For example, 15's combinations can be seen as 9,8,7,6. Thus it will suffice to find the last number in this sequence for xxx. This is because it will tell us how many numbers are in the sequence (ie. 10 minus the last number) which is the same as the number of combinations. The last number is xâ9xâ9x-9 since it corresponds with the combination (xâ9)+9(xâ9)+9(x-9)+9 (which is the last one purely because of how we order them).
Alec Greene at Quora Visit the source
Other answers
Let f(x) be the number of ways two decimal digits can sum to x. Then the number of lucky tickets is 18âi=0f(i)2âi=018f(i)2\sum\limits_{i=0}^{18} f(i)^2 f(0), f(1), ... f(18) = 1,2,3,4,5,6,7,8,9,8,7,6,5,4,3,2,1 So the number of lucky tickets is 1+4+9+16+25+36+49+64+81+64+49+36+25+16+9+4+1 = 489
Andrew Weimholt
Related Q & A:
- Is their a bus that runs from NYC to Sesame Place?Best solution by chartereverything.com
- How can I send a plane ticket to my friend in Japan?Best solution by Yahoo! Answers
- Is there a bus from Allentown, PA to Philadelphia?Best solution by Yahoo! Answers
- How much would a train-ticket from Taunton to Brighton cost?Best solution by Yahoo! Answers
- How much is a monthly ticket on the Amtrak?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.