In post 18, StrangerCoug wrote:Here's what should be easy ones, as was traditional for me last time:
You've been hired at the state prison and your job is to oversee the factory that makes the state's license plates. A new license plate series started on Monday, January 1, 2018. In the series, license plates have to be three letters followed by three digits. License plates cannot use the letters I or O, nor can the digits be all zeroes. The license plates are made in sequential order, with the very first plate made on the first day being AAA-001, the plate after that being AAA-002, and so on through AAA-999, with the plate following AAA-999 being AAB-001. Assume your prison makes exactly 25,000 plates per day Monday through Friday with no holiday breaks and that there are no other restrictions to the allowed plate numbers.
- What was the number of the last plate made on January 5, 2018? What will be the number of the last plate made on December 31, 2018?
- On what day will you make plate number ZZZ-999? Which plate that day will that be?*
- Suppose a law is passed that, after all the available numbers as above are exhausted, the alphabetic and numeric portions change places so that after ZZZ-999 comes 001-AAA. The numeric portion is still the portion that is incremented for the next plate, with the rollover from 999 to 001 incrementing the alphabetic portion, so the sequence goes ..., ZZZ-999, 001-AAA, 002-AAA, ..., 999-AAA, 001-AAB, ... If ZZZ-999 and 001-AAA are made the same day and you still make 25,000 plates total that day, when will you make plate number 999-ZZZ?
* For clarity, I'm looking for an ordinal number to the second part of the question, such as "the 12,345th plate" (which is incorrect, by the way).
The end of January 5, 2018, means 25,000 * 5 = 125,000 plates will have been made.
There are 999 plates that start with AAA-???, AAB-???, and so on.
999 * 125 = 124,875 plates, so we are looking for the 126th letter combination, and the 125th number combination of that letter combo, which is 125.
The 126th letter combo is: AA?-??? has 26 combinations. 26 * 4 = 104. We are looking for the 5th A??-??? letter combo, so AE?-???, and we are looking for the 22nd letter to follow that (126 - 104 = 22), which is a W.
That makes the last plate on Friday, January 5th, 2018 to be AEW-125.
December 31, 2018 is the 365th day of the year because 2018 is not a leap year. There are 7 days in a week, and 7 * 52 = 364. So the 53rd week, and December 31 2018 is a Monday.
The plate factory only works 5 days a week. In 2018, there are 52 full weeks, so 52 * 5 = 260 days. Then finally add the Monday on December 31 2018: 261 days.
At the end of December 31, 2018, 25,000 * 261 = 6,525,000 plates will have been made.
There are 999 plates per letter combo. 6,525,000 / 999 = 6531.531..., so we are looking for the 6532nd letter combination.
6531 * 999 = 6,524,469.
6,525,000 - 6,524,469 = 531, so we need the 531st number combination, which is 531.
There are 26 AA? letter combinations, and 26 * 26 = 676 A?? letter combinations.
6532 / 676 = 9.662..., so we are looking for the 10th ?AA letter combination, or the 10th letter as the first letter, which is a J.
-------------------- Right now, we have the plate: J??-531 ---------------------
9 * 676 = 6084 and 6532 - 6084 = 448, so we are looking for the 448th two-letter combo.
448 / 26 = 17.230... so we need the 18th letter as the second letter of our plate, which is an R.
17 * 26 = 442 and 448 - 442 = 6, so the last letter is the 6th letter, which is the F.
That means that the last plate made on Monday December 31, 2018 is the plate JRF-531.
There are 999 number combinations, and 26 * 26 * 26 = 17,576 letter combinations, which means 17,576 * 999 = 17,558,424 combinations.
That means we are looking for the date on which the 17,558,424th plate is made.
25,000 plates are made each day, so 17,558,424 / 25,000 = 702.336, so the plate is made on the 703rd day on which plates are made.
There are five days a week in which plates are made, so 703 / 5 = 140.6, so the plate is made in the 141st work week, and on the third day of that week, so the Wednesday.
7 days a week, so 140 * 7 = 980 days + 3 = 983, so the 983rd day with January 1, 2018 as the first day.
2018 and 2019 are not leap years, so 365 * 2 = 730, and 983 - 730 = 253, so we are looking for the 253rd day in 2020.
2020 though is a leap year. With 31 representing the amount of days in January and so on, 31 + 29 + 31 + 30 + 31 + 30 + 31 + 31 = 244 days January through August. The 9th day of September, so the plate is made on Wednesday, September 9, 2020.
702 * 25,000 = 17,550,000, and 17,558,424 - 17,550,000 = 8,424.
That means that ZZZ-999 is the 8,424th plate made on Wednesday, September 9, 2020.
There are 17,558,424 combinations where the first part is made up of letters. Now we reverse that, so 17,558,424 * 2 = 35,116,848 plates.
35,116,848 / 25,000 plates a day = 1404.67... so the 1405th day is the day the plate is made.
Five days a week in which plates are made, so 1405 / 5 = 281.2, so the plate is made on the first day of the 282nd week.
7 days a week, so 281 * 7 1967 + 1 = 1968, so the 1968th day with January 1, 2018 as the first day.
2018 and 2019 are not leap years, so 365 * 2 = 730. 2020 is a leap year, so 730 + 366 = 1096. And 1405 - 1096 = 309. So the plate is made on the 309th day in 2021.
31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31 = 304, and 309 - 304 = 5, so the 5th day of November.
That means that the plate 999-ZZZ will be made on Monday, November 5, 2021.
I really hope I got all of these right because I spent a lot of time on getting these answers.