• 3 Posts
  • 148 Comments
Joined 1 year ago
cake
Cake day: October 19th, 2023

help-circle

  • You got downvoted here but you’re absolutely right. It’s easy to prove that the set of strings with prime length is not a regular language using the pumping lemma for regular languages. And in typical StackExchange fashion, someone’s already done it.

    Here’s their proof.

    Claim 1: The language consisting of the character 1 repeated a prime number of times is not regular.

    A further argument to justify your claim—

    Claim 2: If the language described in Claim 1 is not regular, then the language consisting of the character 1 repeated a composite number of times is not regular.

    Proof: Suppose the language described in Claim 2 is regular if the language described in Claim 1 is not. Then there must exist a finite-state automaton A that recognises it. If we create a new finite-state automaton B which (1) checks whether the string has length 1 and rejects it, and (2) then passes the string to automaton A and rejects when automaton A accepts and accepts when automaton A rejects, then we can see that automaton B accepts the set of all strings of non-composite length that are not of length 1, i.e. the set of all strings of prime length. But since the language consisting of all strings of prime length is non-regular, there cannot exist such an automaton. Therefore, the assumption that the language described in Claim 2 being regular is false.















  • NateNate60@lemmy.worldtolinuxmemes@lemmy.worldapt install firefox
    link
    fedilink
    arrow-up
    118
    arrow-down
    3
    ·
    2 months ago

    I don’t have a problem with snaps as a technology. If you want to use them, then who am I to judge?

    But what I do have a problem with is when I don’t have a choice and I am being forced to use what the distro maintainers think is good for me. That is what finally made me quit Ubuntu and switch to Fedora.







  • This is just simplistic and un-nuanced thinking.

    The use of bots is not to generate new opinions, it is to make fringe opinions seem more popular than they are. Most (but not all) opinions propagated this way are already worthy of dismissal for other reasons, but when it’s clear that someone is repeating word-for-word a line of dismissable or unsound rhetoric which is also being propagated by those bots, it lends itself to three reasonable conclusions:

    1. This person genuinely believes that and was not influenced by the bots to do so, i.e. it is a coincidence
    2. This person genuinely believes that but only because they were stupid enough to get absorbed by the bots
    3. This person does not genuinely believe that and is acting in bad faith

    Only in case 1 is such an opinion worth discussing, but the vast majority of cases will be case 2 or case 3.

    That is why it is reasonable to dismiss such opinions despite the possibility that they are genuine, in good faith, and not the product of propaganda. Because the odds that they’re not are vastly greater. Nobody can be certain of anyone’s intentions on the Internet, so rational actors can only play a game of “What is the most likely scenario?”.