I have this language: $$ L = { \{\ a^{i^{2}} : i \in N \ \cup \{0\} \ \}} $$  I need to prove that the language is not regular by using pumping lemma. I assume that the language is regular so I choose suitable word with which I will be trying to prove that it's not regular language.  The word that is suitable should be $w = a^{p^{2}}$ then I can decompose that word to $xyz$ parts  $$|xy| \leq p \ \land |y| \ge 1$$  The decomposition is:  $$x = a^{l}\land l\ge0\\y= a^{k}\land k\ge1\\z=a^ma^{p^{2}-p}\land m\ge0\\l+k+m=p\ \land l+k\leq p $$  Now I will pump the $y$ part in $xy^{i}z$ so the word won't be in the language anymore and that means that the language was not regular.  The problem is I have absolutely no idea which $i$ should I choose to break the pumping property and show that the language was not regular. Could anyone explain me for what I should be searching in order "break" pumping property and what $i$ to choose?
I need to prove that the language $\mathscr L=\{0^n \big|\text{n is the square of a natural number}\}$ is non regular using the pumping lemma   My try:  $\mathscr L=\{\overbrace{\epsilon}^{0^2},\overbrace{0}^{1^2},\overbrace{0000}^{2^2},\overbrace{000000000}^{3^2},\overbrace{0000000000000000}^{4^2},\dots\}$  Suppose that $\mathscr L$ is regular so $\exists$ a word '$x$' with length of at least $n$   $|x|\geq n $ such that  $(1)\,\,\,|uv|\leq n$  $(2)\,\,\,|v|\geq 1$  $(3)\,\,\,uv^iw \in \mathscr L$  Now, let as choose the word $\color{blue}{x=0^{n^2}}$  $|x|\geq n$ so we can use $(1)-(3)$  $x=\underbrace{000000\dots}_{n^2\text{ times}}$  $x=uv0^kw=\underbrace{uv0^k}_{\text{n zeros   }}\overbrace{w}^{n^2-n\text{ zeros }}$  Let as choose $\color{blue}{i=??}$      I'm difficult choosing the word '$\color{blue}x$' and choosing  $\color{blue}i$ to come to contradiction with the lemma
How do I replace multiple spaces with a single space in C#? How can I replace multiple spaces in a string with only one space in C#?  Example:  1 2 3  4    5   would be:  1 2 3 4 5 One word/phrase to describe the reaction when you eat a very spicy-hot food I've read the discussion here about .  I've also read this one: .  But I did not find any word or phrase that describes the reaction someone has when eating a too spicy-hot food. You know, they tend to sweat, catch their breath, and even sometimes shed tears; due to the spiciness of the food.  So my questions:        What do you say to describe the reaction someone has when being excitedly "suffered" by a very spicy-hot food? In Indonesian, we would call it kepedasan.   What do you say when you get that thing [the answer to question 1] with you, other than the list I enclose below:                Oh, spicy!     My God, it's spicy-hot!                      Is that it? I have played and tried to GM games since I was in elementary school, beginning with games like Shadowrun, Earthdawn, and Champions. Recently, I've gotten dack into gaming with a variety of other games (newer Shadowrun and Earthdawn, plus TOON! and Outbreak:Undead).  I've found examples of actual play and advice on how to actually GM a game in games to be lacking. I can only help but feel I am not alone as someone who isn't already a LITERAL dungeon MASTER.  I fully realize that there are an unlimited number of GM styles, personalities, etc. I do not think I am a very good GM though. No one else wants to be the GM, and few care enough to learn the complex rules that I often have to assist with and explain AS WE PLAY. Being left with the responsibility is quite overwhelming unless I create dynamic encounters or make it all up on the spot. I'm often left having no idea what to do.  Examples of Why I Think I Need Help  This question isn't about these examples so please don't dig into them in the answers - they're here to explain the basic things that leave me feeling like I don't know how to proceed as a GM.  I've read preparation is important, but last time I tried to make a story, the players immediately killed the primary character (a friendly person.) within about 2 minutes of starting the game. While I realize now that I let the dice take control over the story, it was rather difficult to continue a story that relied on this friendly character, with the players making enemies with the character's faction. It is still discouraging when my only other attempt at a prepared story ended with the players wanting to go in a complete opposite direction of where I planned. Both times, the hours of work I put into it were completely wasted, leaving me as ignorant as I always was before.  My group often wants to play Shadowrun, Earthdawn, or L5R- but I feel as though I am a horrible GM. The last time we played Shadowrun, I was bored out of my mind as we rolled hundreds of dice to do an obvious straight-forward "kick down the door" mission.   If I make security as I believe it should or as the forum threads describe their security or a few example missions I can scrounge up (examples of stories, not actual gameplay), my players literally feel completely hopeless as to how to achieve their mission without total failure.   One time when I was a teenager, I had players blow up at me saying "We have no idea what would work. You're telling us that our character's experience or the ally operative says that would get us killed, but what else can we do?" Since there are no examples of what players can do - I am left with the same feeling as the players. As an adult, I've had a similar occurrence where a player said to me, "I don't know what to do. I don't think we can even begin this mission." I had to make something up and just go with it, creating an NPC group (that fit in with the story) that goes in before the players to do something stupid so they don't have to. Mainly because I ALSO didn't know how to accomplish the mission, so I acted as the players would using my NPC group. Extremely boring and IMO a failed dungeon run.  I've had successful stories, but I've had more boring encounters than successful ones. Seeing as how roleplaying takes endless hours to complete a story, I do not see benefit in an activity that wastes more time than is enjoyable.  How Do You Learn To GM?  Where are the resources? Books, blogs, gameplay examples? Am I missing them? How did YOU learn to be a good GM? Or do you feel as bad at this as I do, even when it's a successful, fun encounter? My online friend is asking for money in order to visit my home country. Is this a legit request or a scam? On Travel.SE we often see questions about a person (usually a love interest) asking for money to pay for airfare, visas, permits and other expenses. For example        What general advice can be given in such situations to the person asking the question? Is it all a scam or can there be legitimate situations in which an online friend could be asking for money? I'd like to write an N-body simulation in which I collide two disk galaxies. To give you an idea of the accuracy I'm trying to achieve, I'm aiming to make this my screensaver at 30fps on my work desktop. Think Euler's method, large epsilons in denominators to prevent blow up, all that lazy stuff.   One place I don't want to be lazy, however, is in the initial construction of the galaxies I'm trying to collide. I want to design a galaxy that will at least sort of hold together by its own gravity until it smash it into another one.   How might I go about selecting the orbital velocities for each of the bodies composing the galaxy? Prove that a function is not injective Difference between declaring variables before or in loop? I have always wondered if, in general, declaring a throw-away variable before a loop, as opposed to repeatedly inside the loop, makes any (performance) difference?  A (quite pointless) example in Java:  a) declaration before loop:  double intermediateResult; for(int i=0; i &lt; 1000; i++){     intermediateResult = i;     System.out.println(intermediateResult); }   b) declaration (repeatedly) inside loop:  for(int i=0; i &lt; 1000; i++){     double intermediateResult = i;     System.out.println(intermediateResult); }   Which one is better, a or b?   I suspect that repeated variable declaration (example b) creates more overhead in theory, but that compilers are smart enough so that it doesn't matter. Example b has the advantage of being more compact and limiting the scope of the variable to where it is used. Still, I tend to code according example a.  Edit: I am especially interested in the Java case. Software for drawing geometry diagrams I have a layer of georeferenced points, and a layer of vectorized borders. Is there a way I can use QGIS to calculate how many points fall within each area of the borders layer? How can I avoid name mangling in C++? Calculating values of field based on two others using Field Calculator in ArcGIS Desktop? I need to combine two fields in an attribute table.  I want to do this using the field calculator.  What is the proper script to write to combine a field called "name" and "type", so that it produces one field with "name type"?  I'm using ArcGIS Desktop 10.0. Force refresh view in LWC In Aura, we can do      $A.get('e.force:refreshView').fire();   to cause standard components to update.  How can we do an equivalent in LWC because sfdx refuses to publish .js code with $A in it saying the usage is disallowed in LWC?  For now i tricked it with   eval("$A.get('e.force:refreshView').fire();");   but that is obviously less than ideal.... Pronoun question: referring to inanimate objects as 'he' or 'she' I read the following claim concerning pronouns referring to inanimate objects:      Anything that is meant to contain you, protect you or provide you with something beneficial is [often referred to as] a she; anything that is a perceived threat is a he. That's why cars, boats and some countries are she.    Is this really the case, or is it just a subjective claim? (According to the  using he/she for inanimate objects is not recommended and it should be used instead.) Is there a 'rule' for determining whether to use he, she or it based on the impression one would like to express? (I only know the 'rule' for animals: In the case where you know their gender and they are important to you, you refer to them using he/she. E.g. A dog attacked me in the street. It bit me. versus This is my dog Roger. He is 7 years old.) Have these practices changed over time?   Note 1: There is already a similar question (), but that considers only the feminine case and none of the answers offers an objective discussion of the matter.  Note 2: My native language is Czech, where the gender of the pronoun is based only on the grammatical gender of the noun. E.g. a cat (kočka) is always she, a dog (pes) is always he, a boat (loď) is always she and a car (auto) is always it. How can I copy the path to a folder or a file? The Info Dialog doesn't allow me to copy the information that stands there ...    Is there an easy way to do this? Shell Script for logging into a ssh server I tried writing a shell script which can do automatic login into a ssh server using password which is mentioned in the script. I have written the following code:  set timeout 30 /usr/bin/ssh -p 8484 root@172.31.72.103 expect  {    "root@172.31.72.103's password"     {       send "password\r"     } }   This code is not running properly, still it is asking for the password. Can somebody please help me in solving this I keep seeing custom flags in the queue from question askers who are incredibly irritated because there is a big, prominent box at the top of their question. It's just a list of other questions which may have the answer they desire, and is only even displayed to them because the question is not closed yet.  This question may already have an answer here: [list]  But to an ordinary user, it is not at all clear that the box is only shown to them, or that it will go away on its own if their question never actually gets closed. Could the text for this notice be altered to make it more clear that:  They are just suggestions for the person to view. Potentially if they agree with one, they should vote to close their own question as a duplicate of it.  Their question is not closed yet. If they disagree with the duplicates suggested, they should clarify their question and explain why it's not a duplicate.   I was thinking of an altered wording such as:  You might be able to find an answer to your question here: [list] If those answers do not fully address your question, please [edit your question] to clarify your exact problem.  I went with a more direct wording for the bolded title. Since the notice is only displayed to the asker, it makes more sense to talk directly to them in the message rather than making it feel like it's supposed to be addressing the entire audience of the site. Emphasize that only that person is seeing it by talking to them. It would also be helpful to append a &quot;More info&quot; link at the end of the message that links them to some further documentation about duplicates, and explains how the notice works - particularly that it will go away eventually or change to a proper duplicate notice if the question does get closed. I've used Windows for many years, using Dreamweaver as my editor as it had a file tree which is based on a project (via Local, FTP or SFTP).  I need a web development IDE with the following functionality:   syntax highlighting for PHP, HTML, CSS, JavaScript  file tree - Local, FTP, SFTP, Project-Based (e.g. via the methods of Local/FTP/SFTP) in other words, like Dreamweaver can open multiple files (tabbed)   Additionally, I wouldn't mind features like debugging, class listings, etc, as long as I can hide them away. How do I run a file on localhost? Grammar checking program for LibreOffice Is there a tool for checking grammar in LibreOffice? C++11: defining function on std::array