# Interesting tea-time problem

Problem A: Please fill each blank with a number such that all the statements are true:

0 appears in all these statements $____$ time(s)
1 appears in all these statements $____$ time(s)
2 appears in all these statements $____$ time(s)
3 appears in all these statements $____$ time(s)
4 appears in all these statements $____$ time(s)
5 appears in all these statements $____$ time(s)
6 appears in all these statements $____$ time(s)
7 appears in all these statements $____$ time(s)
8 appears in all these statements $____$ time(s)
9 appears in all these statements $____$ time(s)

Note: they are treated as numbers, not digits. e.g. 11 counts as occurrence of 11, but not two 1.

EDIT
How do number of solutions behave, with respect to number of statements there are? I need a sketch of the proof.

-

2
For problem B, won't the smallest number always be 0? Also, does $11$ count as two appearances of $1$, or one appearance of $11$? – Erick Wong Feb 5 at 18:29
yes you are right, i will change to smallest positive number – mezhang Feb 5 at 19:50
@ErickWong, lets consider 11 as a number not as two digits. – mezhang Feb 5 at 19:54

## 3 Answers

Note this does carry the assumption of counting the occurrence of the number at the start of the statement and not strictly in the boxes as there is a bit of interpretation there:

The first one has at least one solution. 1732111211 would be the values where there are 7 1s in the statements occurring in the all but 3 of the lines, those being the 2,3, and 7 lines. 2 appears 3 times as it is the number of 7s and 3s in the sequence. 3 appears twice as it is the number of 2s as well as its own line for its other appearance.

The first one would appear to be easily generalized as if one wanted to take away the line with 9s, then the number of 1s will drop to 6 and the 2 that was on the 7s will come down one row. This could be repeated up to a few times I'd think. 0,1,5, and 6 would give 4 times that a 1 would appear so for at least 7 rows this can be done. One could add lines for 10,11, and so on which would increase the number of 1s and then the 2 that is on the 7s would shift up.

-

For the revised B there are exactly 3 solutions consisting of single digits: $173311121291$, $174121121291$, $191311111391$. No single-digit solutions were found to the original B, and the solution to A is unique within this class.

-

Douglas Hofstadter wrote about these problems years ago. He suggested a useful approach is to fill in the blanks with something, then just count and refill, iterating to convergence. On the first one, I got trapped in a loop between $1741111121$ and $1821211211$ and for the second a loop between $254311311150$ and $262323111160$ where the largest is taken from the current iteration instead of the last.

-

1
For the first one $1732111211$ works. – Erick Wong Feb 5 at 19:05
Did he talk about uniqueness of solution? – mezhang Feb 5 at 19:52
@mezhang: No, and he mentions the possibility of getting stuck in a loop. – Ross Millikan Feb 5 at 19:54
@mezhang See my new answer (by brute force computation) – Erick Wong Feb 5 at 20:01
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 21, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9614351391792297, "perplexity_flag": "middle"}