[HN Gopher] The emoji problem (2022)
       ___________________________________________________________________
        
       The emoji problem (2022)
        
       Author : mtsolitary
       Score  : 300 points
       Date   : 2025-05-20 10:18 UTC (12 hours ago)
        
 (HTM) web link (artofproblemsolving.com)
 (TXT) w3m dump (artofproblemsolving.com)
        
       | ykonstant wrote:
       | I remember the problem when it first appeared, we had a good
       | laugh at the number theory seminar :)
        
       | gcanyon wrote:
       | Once upon a time I was good at math -- like, win state-wide
       | competitions, get a scholarship good. It's sad that I can easily
       | follow the path laid out here, but I am nowhere close to being
       | able to lay out this course on my own.
        
         | dmurray wrote:
         | Nobody can do this on their own. You don't get to do this by
         | having a great aptitude for high school maths and then being
         | exposed to one or two more concepts that just intuitively click
         | - which is enough to be competitive at the level you describe,
         | though not enough to make the US Olympiad team.
         | 
         | You get the level of understanding necessary to create this
         | blog post by already having worked through several textbooks
         | and papers on number theory, elliptic curves, etc. So you don't
         | do it on your own, you do it with help from Poincare and Euler
         | and Diophantes and whoever else.
         | 
         | Based on your description, you absolutely have the aptitude to
         | do this if you pursued maths further academically. And also by
         | having great teaching and explaining skills - that part might
         | be harder to learn.
        
           | ysofunny wrote:
           | you seem to be missing this idea that mathematics must be
           | doable alone, individually
           | 
           | this appears to be what sets mathematics appart from science?
           | I mean, it's not like Euler, or Poincare, and so on, are
           | really there with you when "doing math"
           | 
           | point being, mathematics is not a team game. but everything
           | else is??
        
             | mcphage wrote:
             | > point being, mathematics is not a team game. but
             | everything else is??
             | 
             | Sorry, it's early, and I can't tell if you're being
             | sarcastic. I hope you are? Mathematics is very much a team
             | game.
        
               | celticninja wrote:
               | i think based on the username they seem to be looking for
               | validation through upvotes. Perhaps assuming this place
               | is like a nerdier reddit.
        
               | ysofunny wrote:
               | actually, reddit is a mainstream hacker news
               | 
               | to me old.reddit.com will always be reddit.com
        
               | celticninja wrote:
               | Ah I never changed from old.reddit, I am sure the current
               | version is entirely unrecognisable. It throws me
               | sometimes when a comment mentions a users pfp, because
               | wtf? Reddit doesn't have user profiles with pictures.
        
             | gus_massa wrote:
             | When I'm teaching congruence or the Gauss method to solve
             | equation systems, I tell my students: " _You can solve the
             | midterm alone or with the ghost of Gauss sit on the side
             | chair._ "
        
               | jerf wrote:
               | I like that. "Standing on the shoulder of giants" is a
               | fairly common way to phrase this, and it captures truth
               | as well, but "on a team with the greatest mathematicians
               | of history" is pretty fun too.
               | 
               | Pity I'm by far the weakest link in such team-ups. :)
        
           | patapong wrote:
           | The picture says 95% are unable to solve this - I wonder what
           | the correct percentage is. Closer to 99.999% I would guess,
           | based on your explanation.
        
             | amenghra wrote:
             | Originally, more like 99.999995%
        
       | oytis wrote:
       | It's year 2025, why doesn't the author use actual fruit emoji for
       | variable names?
        
         | voidUpdate wrote:
         | While current year is 2025, the year the language was made in
         | probably isnt
        
           | socalgal2 wrote:
           | Good or not, many languages choose not to support emoji, even
           | newer ones.
           | 
           | The reasons are complicated but, many people prefer unicode
           | normalization so that different forms of what appear to be
           | the same word are considered the same word. People argue
           | whether or not this is important but it can certainly be
           | argued that it would be frustrating to get an error like
           | let cafe = 1;         cafe += 1;  // error, unknown
           | identifier 'cafe'
           | 
           | The error happens in non-normalizing languages because those
           | to idenifiers are not the same unicode.
           | 
           | But, choosing a normalization affects emoji as well. Worse,
           | when new ones are added the normalization rules can change.
        
             | cout wrote:
             | I had an idea the other day to use 64-bit character codes.
             | Then each code can be interpreted as an 8x8 bitmap. Every
             | character would be guaranteed to have a unique bitmap
             | representation. The bitmaps wouldn't bet used for
             | rendering, of course -- but they could be used as a
             | fallback if your font does not define a character. Anyway
             | this would somewhat avoid the problem you describe because
             | two characters that look the same visually would have the
             | same value. Nothing I'll ever implement of course, just a
             | thought experiment.
        
               | JdeBP wrote:
               | As someone who has worked with 8x8 fonts I can report
               | that you'd have some surprising problems with that idea.
               | Not only would you have problems with there being two
               | distinct forms of letters like "a" and "g", making things
               | over-unique; and not only is it tricky to differentiate
               | forms that actually are _not_ the same, because they are
               | from two different alphabets (especially the 13 extra
               | "mathematical" alphabets); but it's actually quite
               | difficult to make pre-composed forms in that amount of
               | space.
               | 
               | 8x8 is a tight squeeze, and 16x16 works a lot better. But
               | that would make your approach vastly more space hungry
               | than a normalization approach using the actual Unicode
               | code points.
               | 
               | * https://github.com/jdebp/unscii/tree/2.1.1f
        
           | frollogaston wrote:
           | The early pages of the Swift docs show you can use emojis as
           | variable names, and iirc that was the very first page in the
           | Swift 1.0 handbook. I have a theory that the language design
           | was originally motivated by emojis, because there were also
           | interesting choices around strings, like originally having no
           | ".length" method.
        
             | ttepasse wrote:
             | Here: https://docs.swift.org/swift-book/documentation/the-
             | swift-pr...
             | 
             | Easter egg: The example is named dogcow, after a 90s Mac
             | icon, designed by Susan Kare, which later became a small
             | mascot: https://512pixels.net/dogcow/
             | 
             | Regarding .length: Effectly that is just the result of
             | Unicode, there is no one-to-one equivalent between
             | characters code points, the code units in an encoding and
             | the resulting grapheme clusters. That is in effect a result
             | of the complexity of the world's alphabets, including
             | Emoji.
        
         | aragonite wrote:
         | When trying to understand complex C codebase I've often found
         | it helpful to rename existing variable as emojis. This makes it
         | much easier to track which variables are used where & to take
         | in the pure structure of the code at one glance. An example I
         | posted previously: https://imgur.com/F27ZNfk
         | 
         | Unfortunately most modern languages like Rust and JS follow the
         | XID_Start/XID_Continue recommendation (not very well-motivated
         | imo) which excludes all emoji characters from identifiers.
        
           | unstuck3958 wrote:
           | wouldn't writing a parser of sorts that would replace emojis
           | with a valid alphabetical string identifier be trivial?
        
             | aragonite wrote:
             | You're right that writing a preprocessor would be
             | straightforward. But while you're actively editing the
             | code, your dev experience will still be bad: the editor
             | will flag emoji identifiers as syntax errors so mass
             | renaming & autocompletion won't work properly. Last time I
             | looked into this in VSCode I got TypeScript to stop
             | complaining about syntax errors by patching the identifier
             | validation with something like `if (code>127) return true`
             | (if non-ascii, consider valid) in
             | isUnicodeIdentifierStart/isUnicodeIdentifierPart [1]. But
             | then you'd also need to patch the transpiler to JS,
             | formatters like Prettier, and any other tool in your
             | workflow that embeds their own version of TypeScript...
             | 
             | [1] https://github.com/microsoft/TypeScript/blob/81c951894e
             | 93bdc...
        
         | qingcharles wrote:
         | Here's Gemini's (brute force?) solution to the problem in C#
         | using fruit emoji variables:
         | 
         | https://imgur.com/a/cC5QPH0
        
           | oytis wrote:
           | Nice! Not going to work, but appreciate the emoji.
           | 
           | UPD. This code is like that picture with Disney princesses.
           | The closer you look, the scarier it gets
        
       | raverbashing wrote:
       | So the meme was a crap-post and never "supposed" to be solved
       | anyway (in human terms?)
        
         | yorwba wrote:
         | At least it was a problem with a known solution obtainable by a
         | standard procedure in not too many steps. Could've also picked
         | a deceptively simple Diophantine equation where it is unknown
         | whether it even has any solutions or not:
         | https://thehighergeometer.wordpress.com/2021/07/27/diophanti...
        
         | rdlw wrote:
         | I think the real joke is that the average Facebook user, with
         | no higher math, might be tricked into trying to solve it, and
         | independently rediscover methods for solving diophantine
         | equations and elliptic curves, all so that they can prove that
         | they're in the 3% by commenting what the strawberry equals.
        
           | raverbashing wrote:
           | Hah yeah. But probably more like 0.03% (no kidding)
        
       | less_less wrote:
       | The theory of elliptic curves goes amazingly deep. Scratching the
       | surface slightly more, to fill in the article's "ignore the
       | labels like 2P":
       | 
       | Intersecting the curve with lines the way the author does is,
       | perhaps shockingly, a commutative group operation, known as point
       | addition. You define this operation by saying that the three
       | points A,B,C on a line sum to zero: that is A+B+C=0 or in other
       | words, A+B = -C. Reflecting across the curve's line of symmetry
       | is negation (there's an alternative definition that extends to
       | curves without reflection symmetry). Combining the two defines an
       | operation A+B which adds two points on the curve and gives a
       | third one: draw the line from A to B, intersect it with the curve
       | to find a point -A-B (using the same type of formula given in
       | this article) and then reflect it to get A+B. This addition
       | operation obviously commutes (meaning, the line between A and B
       | is the same as the line between B and A), but surprisingly it
       | also associates and you get a group operation.
       | 
       | (For math olympiad nerds out there: so the union of a conic and a
       | line is also a bivariate cubic equation. You can carry out the
       | same "addition" operation there. Again the operation clearly
       | commutes. But it also associates! This is basically Pascal's
       | theorem.)
       | 
       | The theory of elliptic curves is also the basis of elliptic curve
       | cryptography. In that case, instead of the curve being over the
       | reals, all the calculations are done mod some prime p, which
       | destroys structure based on continuity and prevents the numbers
       | from becoming too large. There are a bunch of subtleties here but
       | the key is that you can still straightforwardly compute addition
       | in this context, with basically the same formulas. Then from
       | addition you can get n*A, both for small integers n (eg 5*A =
       | A+A+A+A+A) but also for large n (e.g. 2*A = A+A; 66*A =
       | 2*2*2*2*2*2*A + 2*A). This "scalar multiplication" operation is a
       | one-way operation for appropriately chosen curves: it's easy to
       | calculate n*A from (n,A), but as far as we know it is hard to
       | calculate n from (A,n*A) ... at least if you can't build a large
       | quantum computer.
       | 
       | This gives you mix of easy operations (eg, addition and scalar
       | multiplication) plus problems believed to be hard, which is a
       | great starting point to build cryptography. There are a lot of
       | important technical details, though fewer than with the new
       | lattice schemes.
       | 
       | (Further comment on the olympiad thing: so you can do this with
       | conic+line too, extending from addition to multiplication and
       | using the same formulas mod p. But it's not as good: it's not
       | hard to find a projection that sends the line to infinity and the
       | conic to the unit circle or similar, and then the group operation
       | becomes equivalent to multiplying the points' coordinates as
       | complex numbers or similar. If the group operation is equivalent
       | to multiplication, then scalarmul becomes equivalent to
       | exponentiation, which ends up being in Fp or Fp^2 depending on
       | some Legendre symbol or other. Exponentiation is still
       | potentially secure: it's basically classical Diffie-Hellman.
       | However, more attacks are known on exponentiation in Fp or Fp^2:
       | the attacks don't outright break it but you need p to be much
       | bigger.)
       | 
       | Edit: unescaped stars make italics.
        
       | OisinMoran wrote:
       | I love this genre! I've started calling it "Dantzig Sniping" and
       | here's my own one:
       | https://x.com/TheOisinMoran/status/1298305686082744320
       | 
       | Some more context and related ones here:
       | https://x.com/TheOisinMoran/status/1299124512240398336
        
         | przemub wrote:
         | I thought you named it for Gdansk (Danzig) and was wondering
         | what's got sniped there :)
        
         | zahlman wrote:
         | How does one discover problems with this property?
        
       | amenghra wrote:
       | There is a great quora answer for this one:
       | https://www.quora.com/How-do-you-find-the-positive-integer-s...
        
         | stronglikedan wrote:
         | now _that 's_ peak Quora right there!
        
           | kurthr wrote:
           | Yeah, yeah, they just _mumble mumble_ diophantine _mumble
           | mumble_ elliptic curve _mumble mumble_ Weierstrass form
           | _mumble mumble_ like your boring old uncle at Christmas. GET
           | TO THE ANSWER!                  15447680210874616644195131501
           | 9919837485664325669565431700026634898253202035277999        3
           | 6875131794129999827197811565225474825492979968971970996283137
           | 471637224634055579        43736126779286972578612526023713901
           | 52816537558161613618621437993378423467772036
        
           | behnamoh wrote:
           | I really miss those years when Quora was a decent place. it
           | went downhill when they decided to aggressively monetize it.
           | 
           | the same happened to poe.
        
             | ToucanLoucan wrote:
             | I heard they use LLMs to generate questions and answers to
             | those questions to help drive traffic, which is why no
             | matter what insane bullshit you type into google, you will
             | probably get a quora page about it.
             | 
             | Something something dead internet theory.
        
               | morkalork wrote:
               | I saw a reddit thread from sub about {specific retailer}
               | in {specific geographical region} where the OP ends with
               | ChatGPT's classic "Would you like some more variations of
               | this text?" response and the whole damn thread was other
               | users happily replying on topic, totally missing that OP
               | was clearly a bot because they were probably bots too.
               | But hey, they all get karma, all get activity and look
               | they're members of {geographic region} so their opinions
               | on future political threads in {region} are totally legit
               | right?
               | 
               | But yeah, something something dead internet theory
               | indeed.
        
         | fsckboy wrote:
         | > _quora answer for this one_
         | 
         | that quora article is written by Alon Amit and fwiw, TFA quotes
         | Alon Amit, so his thoughts are ex post.
        
       | jsheard wrote:
       | > A guy by the name of Sridhar Ramesh
       | 
       | Sridhar is a pro follow, you don't see many people with PhDs in
       | both math _and_ shitposting.
        
       | adzm wrote:
       | On a related tangent, when I was teaching my younger kids about
       | math and helping with homework, I would often rewrite things as a
       | formula, or rewrite the formula itself once they got to that
       | point. However instead of things like x I would use things like
       | fluffy cloud, star, etc. They thought it was annoying but it
       | still kept them interested and have said they've done the same
       | when helping their peers. It's easy to forget what it was like
       | learning these abstractions, and it was important to show that x
       | was nothing special, it could be a sun, it could be the phrase
       | "total number of kittens"
        
         | somat wrote:
         | > it could be the phrase "total number of kittens"
         | 
         | There is this minimalism present in math culture, while I sort
         | of understand it, when tossing and mixing formulas it helps to
         | have everything as small as possible. but later, when it is
         | published it really sucks for readability, "Okay here is an
         | item doing some heavy lifting in this formula what is it for?
         | hell if I know some joker labeled it 'ph' "
         | 
         | I like to joke, If you think programmers are bad at naming
         | thing you should see the mathematicians, they take a perverse
         | pride in their inability to name things.
         | 
         | The worst are programs derived directly from a math paper, if
         | your variable holds the correlation coefficient call it that.
         | we have thousands of years of language and labels we can use to
         | share our ideas with others. don't encrypt it and call it
         | "rho".
        
           | JdeBP wrote:
           | One "fun" aspect to this is that there's not just 1 but 13
           | extra copies of the English alphabet in Unicode that are
           | there specifically for mathematicians to name stuff in
           | formulae and equations.
           | 
           | And with the exceptions of Fraktur and script, free fonts
           | that are already sans-serif and monospace generally do not
           | make the glyphs visually distinct from the actual English
           | alphabet characters similarly weighted and slanted.
           | 
           | Which gives the sighted people a taste of what the sight-
           | impaired people have to suffer when people _abuse_ these code
           | points as ways to write in italics or boldface, because the
           | screen readers _correctly_ obey the important note in Unicode
           | Technical Report 25 that these letters _do not_ combine to
           | make words, and read them out as mathematical formulae where
           | "d" is multiplied by "o" and then by "g".
        
       | robinhouston wrote:
       | Using other constants in place of the '4' can lead to some
       | _really_ gigantic smallest solutions:
       | https://observablehq.com/@robinhouston/a-remarkable-diophant...
        
         | pas wrote:
         | Ah, I really really love the dumb but magnificent on-demand
         | loading of the 120-million-digit-long numbers in a nice little
         | textarea!
        
           | robinhouston wrote:
           | I had fun with that! I'm happy someone appreciates it.
           | 
           | S3's support of the Range: header makes it possible to do
           | that sort of thing remarkably cheaply and efficiently.
        
       | zahlman wrote:
       | The "srsltid" in the query parameters is unnecessary:
       | https://artofproblemsolving.com/community/c2532359h2760821_t...
        
       | rolandhvar wrote:
       | Dumb question, but how do you know it's smallest?
        
         | underdeserver wrote:
         | Not dumb at all, Alon Amit addressed it in the Quora post
         | linked above.
         | 
         | https://www.quora.com/How-do-you-find-the-positive-integer-s...
        
       | lblume wrote:
       | I tried giving this to ChatGPT. (Just by uploading the image to
       | the base OpenAI interface.) I expected to either (a) have the
       | model already know the question and give the right answer, (b)
       | hallucinate an answer or (c) refuse to engage with the problem at
       | all.
       | 
       | Instead, this happened:
       | 
       | https://chatgpt.com/share/682cce62-c53c-8003-be2c-2929395868...
       | 
       | Basically, the model confidently outputs a guess, then calculates
       | it, determines it to be incorrect, and repeatedly tries again,
       | even repeating the same guesses over and over. It does not
       | recognize any symmetry and acts like a completely unstructured
       | agent. In the end, the model vehemently asserts there to be no
       | solutions to this puzzle. I really did not expect this and will
       | update my beliefs accordingly if the models behave as badly with
       | future puzzles.
        
         | LeoPanthera wrote:
         | I'm impressed. There certainly are no "reasonable" solutions,
         | where I am arbitrarily defining reasonable as numbers that
         | humans can work or understand in their heads.
         | 
         | Isn't there a version of ChatGPT that connects to Wolfram
         | Alpha? Did you try that one?
        
       ___________________________________________________________________
       (page generated 2025-05-20 23:00 UTC)