Removing 100 digits from the first 100 numbers
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9GURib1T8z7lCwjOGLQaGtrueEthgQ8LO42ZX8cOfTqDK4jvDDpKkLFwf2J49kYCMNW7d4ABih_XCb_2UXdq5fPJDkoyg7-8g_YfRUot-XnaXkNYycsNp7lA5_TW9td0FFpLQ2APzKcZ/s1600/1.jpg)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQ0N5W1qAOxLP7t7iOM6O6AzbZnkXUy16s7P_CWfOb5UbTQY_aDsc727chyphenhyphen5W4IppVNernMMQeaUFTB_rFzAd95_CDt-tnwN-nBx6JyUp2duGjPaL5-VgNO41AVsA_vu30EJcipdDG409/s400/Clash+Royale+CLAN+TAG%2523URR8PPP.png)
up vote
12
down vote
favorite
Write the first 100 positive integers next to each other to form one big number: $$123456789101112131415161718192021dots90919293949596979899100.$$ If we remove 100 digits (not necessarily consecutive) from this big number, what is the largest possible number that could remain? And the smallest? (Leading zeroes are not permitted.)
Based on a problem from the Moscow Mathematical Olympiad. Seems hard, but the solution is quick and elegant once you spot it.
mathematics optimization
add a comment |Â
up vote
12
down vote
favorite
Write the first 100 positive integers next to each other to form one big number: $$123456789101112131415161718192021dots90919293949596979899100.$$ If we remove 100 digits (not necessarily consecutive) from this big number, what is the largest possible number that could remain? And the smallest? (Leading zeroes are not permitted.)
Based on a problem from the Moscow Mathematical Olympiad. Seems hard, but the solution is quick and elegant once you spot it.
mathematics optimization
add a comment |Â
up vote
12
down vote
favorite
up vote
12
down vote
favorite
Write the first 100 positive integers next to each other to form one big number: $$123456789101112131415161718192021dots90919293949596979899100.$$ If we remove 100 digits (not necessarily consecutive) from this big number, what is the largest possible number that could remain? And the smallest? (Leading zeroes are not permitted.)
Based on a problem from the Moscow Mathematical Olympiad. Seems hard, but the solution is quick and elegant once you spot it.
mathematics optimization
Write the first 100 positive integers next to each other to form one big number: $$123456789101112131415161718192021dots90919293949596979899100.$$ If we remove 100 digits (not necessarily consecutive) from this big number, what is the largest possible number that could remain? And the smallest? (Leading zeroes are not permitted.)
Based on a problem from the Moscow Mathematical Olympiad. Seems hard, but the solution is quick and elegant once you spot it.
mathematics optimization
mathematics optimization
asked Aug 8 at 11:07
![](https://i.stack.imgur.com/sO7Ms.jpg?s=32&g=1)
![](https://i.stack.imgur.com/sO7Ms.jpg?s=32&g=1)
Rand al'Thor
67.7k13224454
67.7k13224454
add a comment |Â
add a comment |Â
3 Answers
3
active
oldest
votes
up vote
13
down vote
The biggest one is
99999785960616263646566676869707172737475767778798081828384858687888990919293949596979899100
Because
We can't influence the number's length (there's a fixed number of digits), so to maximize the value we take the maximal first digit, then second digit etc.
Remove the 84 first non-nines (16 digits left to remove):
999995051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
The largest number within the next 17 digits is 7, so from here, the next digit in the answer can be at most 7 (we can't remove more than 16 digits). So remove 15 non-7's... (1 digit left to remove):
999997585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
From here, the next digit can be at most 8 so remove one non-8 from the middle:
99999785960616263646566676869707172737475767778798081828384858687888990919293949596979899100
The smallest one is
10000012340616263646566676869707172737475767778798081828384858687888990919293949596979899100
Because
Remove 85 non-zeros (leave leading 1). 15 left...
10000051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
The smallest number in the next 16 digits is 1. Remove 1 non-1 (14 left to remove):
1000001525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
The smallest number in the next 15 digits is 2. Remove 1 non-2 (13 left to remove):
100000125354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
The smallest number in the next 14 digits is 3. Remove 1 non-3 (12 left to remove):
10000012354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
The smallest number in the next 13 digits is 4. Remove 1 non-4 (11 left to remove):
1000001234555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
The smallest number in the next 12 digits is 0. Remove 11 non-0's (0 left to remove):
10000012340616263646566676869707172737475767778798081828384858687888990919293949596979899100
Correct! But could you explain the "next digit can be at most ..." parts?
â Rand al'Thor
Aug 8 at 11:25
Added an explanation, plus the answer for the second part.
â jafe
Aug 8 at 11:30
1
You can do better for the second part ...
â Rand al'Thor
Aug 8 at 11:34
Argh, you're right.
â jafe
Aug 8 at 11:37
1
@jafe I updated your "smallest" answer to reflect your final step; I believe this is right now (and matches the smallest answers of the other answers). Feel free to roll back if this is not what you were intending.
â El-Guest
Aug 8 at 13:27
 |Â
show 1 more comment
up vote
6
down vote
First of all, we remove
$100$ digits whatsoever and we cannot change any digit place, so in order to get the biggest or smallest number we need to play with the first digits as big/small as possible. Since 9 is the biggest digit, to make it biggest, we need to try to get as many 9-digit as possible, if somehow it is not possible to get 9 by removing the digits (it will happen examplified below), we need to consider the next biggest digit 8 and etc....
So
To get 9, we need to remove first 8 digits from 123456789101112...,
Then
Remove every 19 digits after 9 because the next 9 is after 19 digits, then look for another 9 and continue removing...
and our number becomes something like below after removing 84 digits:
99999950515253545556575859.......
and we have
16 digit left to remove but we cannot reach to 9 because the next 9 is 19 digits after like before... so we should consider getting 8 in 16 digit, can we reach to 8 with 16 digits? no, then 7? yes after 15 digits luckily..!
so then
remove 15 digits again
then our number becomes:
99999975859..... with 1 digit removing option!
Lastly,
remove $5$ which is between $7$ and $8$, since we dont have 9 after 1 digit, only 8 is biggest possible number!
then the number becomes
9999997859606162....
For the smallest one, the same logic is applicable,
Remove numbers until we encounter $0$.
The frequency of
$0$ in the sequence is 19 again
so our number becomes
10000051525354555657585960....
Then we have 15 digits left to remove so with the same principle
if we remove $15$ digits, we will not able to reach $0$, then we should look for $1$.
First
$1$ exists in the next digit, so remove 1 digit only, then look for another one for the 14 digits if we cant find $1$, look for $2$ etc... this is the general methodology to find the biggest or smallest number.
So our number becomes (if I did not mess up)
10000012340616263....
I think you've miscounted somewhere and removed fewer than 100 digits. The methodology is good though!
â Rand al'Thor
Aug 8 at 11:24
@Randal'Thor did it fast, let me fix it :D
â Oray
Aug 8 at 11:26
add a comment |Â
up vote
2
down vote
I get the smallest one to be:
10000012340616263646566676869707172737475767778798081828384858687888990919293949596979899100
Method:
By following jafe's first 85 deletions, followed by the "5"s in 51,52,53,54 (leaving 1234), then the next 11 digits up the the "0" of 60.
Which is the same as Oray's answer, which I'd not seen - oops!
â Phil M Jones
Aug 8 at 13:22
add a comment |Â
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
13
down vote
The biggest one is
99999785960616263646566676869707172737475767778798081828384858687888990919293949596979899100
Because
We can't influence the number's length (there's a fixed number of digits), so to maximize the value we take the maximal first digit, then second digit etc.
Remove the 84 first non-nines (16 digits left to remove):
999995051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
The largest number within the next 17 digits is 7, so from here, the next digit in the answer can be at most 7 (we can't remove more than 16 digits). So remove 15 non-7's... (1 digit left to remove):
999997585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
From here, the next digit can be at most 8 so remove one non-8 from the middle:
99999785960616263646566676869707172737475767778798081828384858687888990919293949596979899100
The smallest one is
10000012340616263646566676869707172737475767778798081828384858687888990919293949596979899100
Because
Remove 85 non-zeros (leave leading 1). 15 left...
10000051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
The smallest number in the next 16 digits is 1. Remove 1 non-1 (14 left to remove):
1000001525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
The smallest number in the next 15 digits is 2. Remove 1 non-2 (13 left to remove):
100000125354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
The smallest number in the next 14 digits is 3. Remove 1 non-3 (12 left to remove):
10000012354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
The smallest number in the next 13 digits is 4. Remove 1 non-4 (11 left to remove):
1000001234555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
The smallest number in the next 12 digits is 0. Remove 11 non-0's (0 left to remove):
10000012340616263646566676869707172737475767778798081828384858687888990919293949596979899100
Correct! But could you explain the "next digit can be at most ..." parts?
â Rand al'Thor
Aug 8 at 11:25
Added an explanation, plus the answer for the second part.
â jafe
Aug 8 at 11:30
1
You can do better for the second part ...
â Rand al'Thor
Aug 8 at 11:34
Argh, you're right.
â jafe
Aug 8 at 11:37
1
@jafe I updated your "smallest" answer to reflect your final step; I believe this is right now (and matches the smallest answers of the other answers). Feel free to roll back if this is not what you were intending.
â El-Guest
Aug 8 at 13:27
 |Â
show 1 more comment
up vote
13
down vote
The biggest one is
99999785960616263646566676869707172737475767778798081828384858687888990919293949596979899100
Because
We can't influence the number's length (there's a fixed number of digits), so to maximize the value we take the maximal first digit, then second digit etc.
Remove the 84 first non-nines (16 digits left to remove):
999995051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
The largest number within the next 17 digits is 7, so from here, the next digit in the answer can be at most 7 (we can't remove more than 16 digits). So remove 15 non-7's... (1 digit left to remove):
999997585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
From here, the next digit can be at most 8 so remove one non-8 from the middle:
99999785960616263646566676869707172737475767778798081828384858687888990919293949596979899100
The smallest one is
10000012340616263646566676869707172737475767778798081828384858687888990919293949596979899100
Because
Remove 85 non-zeros (leave leading 1). 15 left...
10000051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
The smallest number in the next 16 digits is 1. Remove 1 non-1 (14 left to remove):
1000001525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
The smallest number in the next 15 digits is 2. Remove 1 non-2 (13 left to remove):
100000125354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
The smallest number in the next 14 digits is 3. Remove 1 non-3 (12 left to remove):
10000012354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
The smallest number in the next 13 digits is 4. Remove 1 non-4 (11 left to remove):
1000001234555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
The smallest number in the next 12 digits is 0. Remove 11 non-0's (0 left to remove):
10000012340616263646566676869707172737475767778798081828384858687888990919293949596979899100
Correct! But could you explain the "next digit can be at most ..." parts?
â Rand al'Thor
Aug 8 at 11:25
Added an explanation, plus the answer for the second part.
â jafe
Aug 8 at 11:30
1
You can do better for the second part ...
â Rand al'Thor
Aug 8 at 11:34
Argh, you're right.
â jafe
Aug 8 at 11:37
1
@jafe I updated your "smallest" answer to reflect your final step; I believe this is right now (and matches the smallest answers of the other answers). Feel free to roll back if this is not what you were intending.
â El-Guest
Aug 8 at 13:27
 |Â
show 1 more comment
up vote
13
down vote
up vote
13
down vote
The biggest one is
99999785960616263646566676869707172737475767778798081828384858687888990919293949596979899100
Because
We can't influence the number's length (there's a fixed number of digits), so to maximize the value we take the maximal first digit, then second digit etc.
Remove the 84 first non-nines (16 digits left to remove):
999995051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
The largest number within the next 17 digits is 7, so from here, the next digit in the answer can be at most 7 (we can't remove more than 16 digits). So remove 15 non-7's... (1 digit left to remove):
999997585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
From here, the next digit can be at most 8 so remove one non-8 from the middle:
99999785960616263646566676869707172737475767778798081828384858687888990919293949596979899100
The smallest one is
10000012340616263646566676869707172737475767778798081828384858687888990919293949596979899100
Because
Remove 85 non-zeros (leave leading 1). 15 left...
10000051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
The smallest number in the next 16 digits is 1. Remove 1 non-1 (14 left to remove):
1000001525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
The smallest number in the next 15 digits is 2. Remove 1 non-2 (13 left to remove):
100000125354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
The smallest number in the next 14 digits is 3. Remove 1 non-3 (12 left to remove):
10000012354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
The smallest number in the next 13 digits is 4. Remove 1 non-4 (11 left to remove):
1000001234555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
The smallest number in the next 12 digits is 0. Remove 11 non-0's (0 left to remove):
10000012340616263646566676869707172737475767778798081828384858687888990919293949596979899100
The biggest one is
99999785960616263646566676869707172737475767778798081828384858687888990919293949596979899100
Because
We can't influence the number's length (there's a fixed number of digits), so to maximize the value we take the maximal first digit, then second digit etc.
Remove the 84 first non-nines (16 digits left to remove):
999995051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
The largest number within the next 17 digits is 7, so from here, the next digit in the answer can be at most 7 (we can't remove more than 16 digits). So remove 15 non-7's... (1 digit left to remove):
999997585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
From here, the next digit can be at most 8 so remove one non-8 from the middle:
99999785960616263646566676869707172737475767778798081828384858687888990919293949596979899100
The smallest one is
10000012340616263646566676869707172737475767778798081828384858687888990919293949596979899100
Because
Remove 85 non-zeros (leave leading 1). 15 left...
10000051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
The smallest number in the next 16 digits is 1. Remove 1 non-1 (14 left to remove):
1000001525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
The smallest number in the next 15 digits is 2. Remove 1 non-2 (13 left to remove):
100000125354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
The smallest number in the next 14 digits is 3. Remove 1 non-3 (12 left to remove):
10000012354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
The smallest number in the next 13 digits is 4. Remove 1 non-4 (11 left to remove):
1000001234555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
The smallest number in the next 12 digits is 0. Remove 11 non-0's (0 left to remove):
10000012340616263646566676869707172737475767778798081828384858687888990919293949596979899100
edited Aug 8 at 13:26
El-Guest
12.9k2763
12.9k2763
answered Aug 8 at 11:21
jafe
6,3201577
6,3201577
Correct! But could you explain the "next digit can be at most ..." parts?
â Rand al'Thor
Aug 8 at 11:25
Added an explanation, plus the answer for the second part.
â jafe
Aug 8 at 11:30
1
You can do better for the second part ...
â Rand al'Thor
Aug 8 at 11:34
Argh, you're right.
â jafe
Aug 8 at 11:37
1
@jafe I updated your "smallest" answer to reflect your final step; I believe this is right now (and matches the smallest answers of the other answers). Feel free to roll back if this is not what you were intending.
â El-Guest
Aug 8 at 13:27
 |Â
show 1 more comment
Correct! But could you explain the "next digit can be at most ..." parts?
â Rand al'Thor
Aug 8 at 11:25
Added an explanation, plus the answer for the second part.
â jafe
Aug 8 at 11:30
1
You can do better for the second part ...
â Rand al'Thor
Aug 8 at 11:34
Argh, you're right.
â jafe
Aug 8 at 11:37
1
@jafe I updated your "smallest" answer to reflect your final step; I believe this is right now (and matches the smallest answers of the other answers). Feel free to roll back if this is not what you were intending.
â El-Guest
Aug 8 at 13:27
Correct! But could you explain the "next digit can be at most ..." parts?
â Rand al'Thor
Aug 8 at 11:25
Correct! But could you explain the "next digit can be at most ..." parts?
â Rand al'Thor
Aug 8 at 11:25
Added an explanation, plus the answer for the second part.
â jafe
Aug 8 at 11:30
Added an explanation, plus the answer for the second part.
â jafe
Aug 8 at 11:30
1
1
You can do better for the second part ...
â Rand al'Thor
Aug 8 at 11:34
You can do better for the second part ...
â Rand al'Thor
Aug 8 at 11:34
Argh, you're right.
â jafe
Aug 8 at 11:37
Argh, you're right.
â jafe
Aug 8 at 11:37
1
1
@jafe I updated your "smallest" answer to reflect your final step; I believe this is right now (and matches the smallest answers of the other answers). Feel free to roll back if this is not what you were intending.
â El-Guest
Aug 8 at 13:27
@jafe I updated your "smallest" answer to reflect your final step; I believe this is right now (and matches the smallest answers of the other answers). Feel free to roll back if this is not what you were intending.
â El-Guest
Aug 8 at 13:27
 |Â
show 1 more comment
up vote
6
down vote
First of all, we remove
$100$ digits whatsoever and we cannot change any digit place, so in order to get the biggest or smallest number we need to play with the first digits as big/small as possible. Since 9 is the biggest digit, to make it biggest, we need to try to get as many 9-digit as possible, if somehow it is not possible to get 9 by removing the digits (it will happen examplified below), we need to consider the next biggest digit 8 and etc....
So
To get 9, we need to remove first 8 digits from 123456789101112...,
Then
Remove every 19 digits after 9 because the next 9 is after 19 digits, then look for another 9 and continue removing...
and our number becomes something like below after removing 84 digits:
99999950515253545556575859.......
and we have
16 digit left to remove but we cannot reach to 9 because the next 9 is 19 digits after like before... so we should consider getting 8 in 16 digit, can we reach to 8 with 16 digits? no, then 7? yes after 15 digits luckily..!
so then
remove 15 digits again
then our number becomes:
99999975859..... with 1 digit removing option!
Lastly,
remove $5$ which is between $7$ and $8$, since we dont have 9 after 1 digit, only 8 is biggest possible number!
then the number becomes
9999997859606162....
For the smallest one, the same logic is applicable,
Remove numbers until we encounter $0$.
The frequency of
$0$ in the sequence is 19 again
so our number becomes
10000051525354555657585960....
Then we have 15 digits left to remove so with the same principle
if we remove $15$ digits, we will not able to reach $0$, then we should look for $1$.
First
$1$ exists in the next digit, so remove 1 digit only, then look for another one for the 14 digits if we cant find $1$, look for $2$ etc... this is the general methodology to find the biggest or smallest number.
So our number becomes (if I did not mess up)
10000012340616263....
I think you've miscounted somewhere and removed fewer than 100 digits. The methodology is good though!
â Rand al'Thor
Aug 8 at 11:24
@Randal'Thor did it fast, let me fix it :D
â Oray
Aug 8 at 11:26
add a comment |Â
up vote
6
down vote
First of all, we remove
$100$ digits whatsoever and we cannot change any digit place, so in order to get the biggest or smallest number we need to play with the first digits as big/small as possible. Since 9 is the biggest digit, to make it biggest, we need to try to get as many 9-digit as possible, if somehow it is not possible to get 9 by removing the digits (it will happen examplified below), we need to consider the next biggest digit 8 and etc....
So
To get 9, we need to remove first 8 digits from 123456789101112...,
Then
Remove every 19 digits after 9 because the next 9 is after 19 digits, then look for another 9 and continue removing...
and our number becomes something like below after removing 84 digits:
99999950515253545556575859.......
and we have
16 digit left to remove but we cannot reach to 9 because the next 9 is 19 digits after like before... so we should consider getting 8 in 16 digit, can we reach to 8 with 16 digits? no, then 7? yes after 15 digits luckily..!
so then
remove 15 digits again
then our number becomes:
99999975859..... with 1 digit removing option!
Lastly,
remove $5$ which is between $7$ and $8$, since we dont have 9 after 1 digit, only 8 is biggest possible number!
then the number becomes
9999997859606162....
For the smallest one, the same logic is applicable,
Remove numbers until we encounter $0$.
The frequency of
$0$ in the sequence is 19 again
so our number becomes
10000051525354555657585960....
Then we have 15 digits left to remove so with the same principle
if we remove $15$ digits, we will not able to reach $0$, then we should look for $1$.
First
$1$ exists in the next digit, so remove 1 digit only, then look for another one for the 14 digits if we cant find $1$, look for $2$ etc... this is the general methodology to find the biggest or smallest number.
So our number becomes (if I did not mess up)
10000012340616263....
I think you've miscounted somewhere and removed fewer than 100 digits. The methodology is good though!
â Rand al'Thor
Aug 8 at 11:24
@Randal'Thor did it fast, let me fix it :D
â Oray
Aug 8 at 11:26
add a comment |Â
up vote
6
down vote
up vote
6
down vote
First of all, we remove
$100$ digits whatsoever and we cannot change any digit place, so in order to get the biggest or smallest number we need to play with the first digits as big/small as possible. Since 9 is the biggest digit, to make it biggest, we need to try to get as many 9-digit as possible, if somehow it is not possible to get 9 by removing the digits (it will happen examplified below), we need to consider the next biggest digit 8 and etc....
So
To get 9, we need to remove first 8 digits from 123456789101112...,
Then
Remove every 19 digits after 9 because the next 9 is after 19 digits, then look for another 9 and continue removing...
and our number becomes something like below after removing 84 digits:
99999950515253545556575859.......
and we have
16 digit left to remove but we cannot reach to 9 because the next 9 is 19 digits after like before... so we should consider getting 8 in 16 digit, can we reach to 8 with 16 digits? no, then 7? yes after 15 digits luckily..!
so then
remove 15 digits again
then our number becomes:
99999975859..... with 1 digit removing option!
Lastly,
remove $5$ which is between $7$ and $8$, since we dont have 9 after 1 digit, only 8 is biggest possible number!
then the number becomes
9999997859606162....
For the smallest one, the same logic is applicable,
Remove numbers until we encounter $0$.
The frequency of
$0$ in the sequence is 19 again
so our number becomes
10000051525354555657585960....
Then we have 15 digits left to remove so with the same principle
if we remove $15$ digits, we will not able to reach $0$, then we should look for $1$.
First
$1$ exists in the next digit, so remove 1 digit only, then look for another one for the 14 digits if we cant find $1$, look for $2$ etc... this is the general methodology to find the biggest or smallest number.
So our number becomes (if I did not mess up)
10000012340616263....
First of all, we remove
$100$ digits whatsoever and we cannot change any digit place, so in order to get the biggest or smallest number we need to play with the first digits as big/small as possible. Since 9 is the biggest digit, to make it biggest, we need to try to get as many 9-digit as possible, if somehow it is not possible to get 9 by removing the digits (it will happen examplified below), we need to consider the next biggest digit 8 and etc....
So
To get 9, we need to remove first 8 digits from 123456789101112...,
Then
Remove every 19 digits after 9 because the next 9 is after 19 digits, then look for another 9 and continue removing...
and our number becomes something like below after removing 84 digits:
99999950515253545556575859.......
and we have
16 digit left to remove but we cannot reach to 9 because the next 9 is 19 digits after like before... so we should consider getting 8 in 16 digit, can we reach to 8 with 16 digits? no, then 7? yes after 15 digits luckily..!
so then
remove 15 digits again
then our number becomes:
99999975859..... with 1 digit removing option!
Lastly,
remove $5$ which is between $7$ and $8$, since we dont have 9 after 1 digit, only 8 is biggest possible number!
then the number becomes
9999997859606162....
For the smallest one, the same logic is applicable,
Remove numbers until we encounter $0$.
The frequency of
$0$ in the sequence is 19 again
so our number becomes
10000051525354555657585960....
Then we have 15 digits left to remove so with the same principle
if we remove $15$ digits, we will not able to reach $0$, then we should look for $1$.
First
$1$ exists in the next digit, so remove 1 digit only, then look for another one for the 14 digits if we cant find $1$, look for $2$ etc... this is the general methodology to find the biggest or smallest number.
So our number becomes (if I did not mess up)
10000012340616263....
edited Aug 8 at 13:54
answered Aug 8 at 11:18
![](https://i.stack.imgur.com/AfYMw.jpg?s=32&g=1)
![](https://i.stack.imgur.com/AfYMw.jpg?s=32&g=1)
Oray
14.7k435143
14.7k435143
I think you've miscounted somewhere and removed fewer than 100 digits. The methodology is good though!
â Rand al'Thor
Aug 8 at 11:24
@Randal'Thor did it fast, let me fix it :D
â Oray
Aug 8 at 11:26
add a comment |Â
I think you've miscounted somewhere and removed fewer than 100 digits. The methodology is good though!
â Rand al'Thor
Aug 8 at 11:24
@Randal'Thor did it fast, let me fix it :D
â Oray
Aug 8 at 11:26
I think you've miscounted somewhere and removed fewer than 100 digits. The methodology is good though!
â Rand al'Thor
Aug 8 at 11:24
I think you've miscounted somewhere and removed fewer than 100 digits. The methodology is good though!
â Rand al'Thor
Aug 8 at 11:24
@Randal'Thor did it fast, let me fix it :D
â Oray
Aug 8 at 11:26
@Randal'Thor did it fast, let me fix it :D
â Oray
Aug 8 at 11:26
add a comment |Â
up vote
2
down vote
I get the smallest one to be:
10000012340616263646566676869707172737475767778798081828384858687888990919293949596979899100
Method:
By following jafe's first 85 deletions, followed by the "5"s in 51,52,53,54 (leaving 1234), then the next 11 digits up the the "0" of 60.
Which is the same as Oray's answer, which I'd not seen - oops!
â Phil M Jones
Aug 8 at 13:22
add a comment |Â
up vote
2
down vote
I get the smallest one to be:
10000012340616263646566676869707172737475767778798081828384858687888990919293949596979899100
Method:
By following jafe's first 85 deletions, followed by the "5"s in 51,52,53,54 (leaving 1234), then the next 11 digits up the the "0" of 60.
Which is the same as Oray's answer, which I'd not seen - oops!
â Phil M Jones
Aug 8 at 13:22
add a comment |Â
up vote
2
down vote
up vote
2
down vote
I get the smallest one to be:
10000012340616263646566676869707172737475767778798081828384858687888990919293949596979899100
Method:
By following jafe's first 85 deletions, followed by the "5"s in 51,52,53,54 (leaving 1234), then the next 11 digits up the the "0" of 60.
I get the smallest one to be:
10000012340616263646566676869707172737475767778798081828384858687888990919293949596979899100
Method:
By following jafe's first 85 deletions, followed by the "5"s in 51,52,53,54 (leaving 1234), then the next 11 digits up the the "0" of 60.
answered Aug 8 at 13:21
Phil M Jones
387110
387110
Which is the same as Oray's answer, which I'd not seen - oops!
â Phil M Jones
Aug 8 at 13:22
add a comment |Â
Which is the same as Oray's answer, which I'd not seen - oops!
â Phil M Jones
Aug 8 at 13:22
Which is the same as Oray's answer, which I'd not seen - oops!
â Phil M Jones
Aug 8 at 13:22
Which is the same as Oray's answer, which I'd not seen - oops!
â Phil M Jones
Aug 8 at 13:22
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fpuzzling.stackexchange.com%2fquestions%2f69117%2fremoving-100-digits-from-the-first-100-numbers%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password