All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
Self-Descriptor (Posted on 2002-07-10) Difficulty: 3 of 5
Find a number ABCDEFGHIJ such that A is the count of how many 0's are in the number, B is the number of 1's, and so on.

(Taken from http://einstein.et.tudelft.nl/~arlet/puzzles/logic.html)

See The Solution Submitted by levik    
Rating: 3.8750 (8 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution Exactly one solution | Comment 3 of 14 |
To prove there is only one solution, first realize that A+B+C+D+E+F+G+H+I+J must equal 10, because there are 10 digits, and each digit must be in the range 0-9. This I'll call the sum-of-digits requirement. From this it follows that 0*A + 1*B + 2*C +...+ 8*I + 9*J must equal 10. For example, if C is 3, that means there are three 2's in the number, so the sum of all the 2's (using the sum-of-digits) is equal to 6. This I'll refer to as the sum-of-multiplications requirement.

If A is less than 6, that means there are at least 5 non-zero digits. This would result in a minimum sum-of-multiplications of 0*1 + 1*1 + 2*1 + 3*1 + 4*1, which is 10. However, that number is not valid, and changing it at all only increases its value, so A must be 6, 7, 8, or 9.

A can't be 9, because then J would be 1, leaving only 8 digits to be 0.

A can't be 8, because then I would be 1, and B would be at least 1, leaving only 7 digits to be 0.

A can't be 7, because then H would be 1, and B would be at least 1. It couldn't be 1, since there would then be two 1's, so A would have to be at least 2, and another digit would be non-zero, leaving 6 digits to be 0.

If there is a solution, then, it must have A being 6. If A is 6, that means G must be 1 (It can't be more than 1, but it must be at least 1). Then E, F, H, I, and J must be 0, otherwise the sum-of-multiplications would be more than 10. Likewise, C and D can't be greater than 1. So the number must be 6BCD001000, with B being at least 1 and C and D being no more than 1. If D was 1, the sum-of-multiplications would equal at least 10 (0*6 + 1*1 + 2*C + 3*1 + 6*1 = B+2*C+9). Since that must equal 10, the only solution is for C to be 0. But 6101001000 is not valid, so D must be 0.

So the numbe
  Posted by Ender on 2002-07-11 04:53:47
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (14)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information