Announcement

Collapse
No announcement yet.

what's the 5 letter word with the most one-word anagrams?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #31
    I didn't say it was an ordered field

    Comment


    • #32
      There is a competetive scrabble training program (used to have it) which can answer this question very nicely.

      Comment


      • #33
        Good idea . It took the execution time of my Haskell program for going through /usr/share/dict/words (234937 lines, 2486824 bytes) from ~1.7 seconds to ~1.5 seconds.
        Perhaps you can go even further, how do these ideas sound to you.

        - drop all matching vowels
        - drop very rare consinents like x and z
        - restrict the 3 other letters to consinents only
        - drop all matching consinents

        The base posibilities are 26^5th power = 11,881,376

        With agressive culling its 5 * 4 * 19 * 18 * 17 = 116,280

        A full two orders of magnitude reduction
        Companions the creator seeks, not corpses, not herds and believers. Fellow creators, the creator seeks - those who write new values on new tablets. Companions the creator seeks, and fellow harvesters; for everything about him is ripe for the harvest. - Thus spoke Zarathustra, Fredrick Nietzsche

        Comment


        • #34
          Originally posted by Kuciwalker
          - it can deal with types for which equality is defined but order isn't, that is, you can pass it stuff like complex numbers


          You can order complex numbers
          No you can't.
          12-17-10 Mohamed Bouazizi NEVER FORGET
          Stadtluft Macht Frei
          Killing it is the new killing it
          Ultima Ratio Regum

          Comment


          • #35
            Radix sort. Order them first by real part, then imaginary

            Comment


            • #36
              Witches! All of them! Burn them! Burn them now!
              “As a lifelong member of the Columbia Business School community, I adhere to the principles of truth, integrity, and respect. I will not lie, cheat, steal, or tolerate those who do.”
              "Capitalism ho!"

              Comment


              • #37
                Originally posted by Kuciwalker
                Radix sort. Order them first by real part, then imaginary
                Does not obey rules of total order.
                12-17-10 Mohamed Bouazizi NEVER FORGET
                Stadtluft Macht Frei
                Killing it is the new killing it
                Ultima Ratio Regum

                Comment


                • #38
                  I really must try and do some programming again at some point...haven't done it for many, many years. Could be quite handy in my job, although not essential.
                  Speaking of Erith:

                  "It's not twinned with anywhere, but it does have a suicide pact with Dagenham" - Linda Smith

                  Comment


                  • #39
                    Nerds...
                    You just wasted six ... no, seven ... seconds of your life reading this sentence.

                    Comment


                    • #40
                      Originally posted by KrazyHorse


                      Does not obey rules of total order.
                      Yes it does.
                      It's possible to totally order the complex numbers, it's just not possible to get an ordered field, like Petek said (the total ordering is not compatible with the operations basically).

                      EDIT: I hope this is not a new trend of Kuci owning KH


                      BTW Kuci, your initial remark about ordering complex numbers was pointless . If you consider what you were replying to carefully, you'll see that it's just "witty" and doesn't actually have anything to do.
                      Last edited by Lul Thyme; December 2, 2006, 13:07.

                      Comment


                      • #41
                        So we've seen Linux geek code (Ari), physicist/mathematician code (KH), and now for some software engineer code (in Java for variety):

                        Code:
                        import java.io.IOException;
                        
                        public class Anagram 
                        {
                          int size, count;
                          char[] arr;
                        
                          public static void main(String[] args) throws IOException 
                          {
                            String input = args[0];
                            size = input.length();
                            count = 0;
                            arr = new char[size];
                            for (int i = 0; i < size; i++)
                            	arr[i] = input.charAt(i);
                            anagram(size);
                          }
                              
                          public static void rotate(int anagramSize) 
                          {
                            int i;
                            int position = size - anagramSize;
                            char temp = arr[position]; // 1st letter
                        
                            for (i = position + 1; i < size; i++) // push the rest left
                              arr[i - 1] = arr[i];
                        
                            arr[i - 1] = temp; // now put the 1st on the end
                          }
                        
                        
                          public static void anagram(int anagramSize) {
                            int limit;
                            if (anagramSize != 1) // if 1, this is useless this is useless so don't do anything
                            {
                        	for (int i = 0; i < anagramSize; i++) {
                        	      anagram(anagramSize - 1); // anagram the last bits
                        	      if (anagramSize == 2) // the innermost anagram
                        	      {
                        	      	for (int i = 0; i < size; i++) // display it
                        		     System.out.print(arr[i]);
                        		System.out.println();
                        	      } // end if
                        	     else
                        	      	rotate(anagramSize); // rotate word
                        	} // end for
                            }  // end if
                          } // end anagram()
                        }
                        "The issue is there are still many people out there that use religion as a crutch for bigotry and hate. Like Ben."
                        Ben Kenobi: "That means I'm doing something right. "

                        Comment


                        • #42
                          Oops.

                          I forgot what a total order on a set was (as opposed to on a field)...
                          12-17-10 Mohamed Bouazizi NEVER FORGET
                          Stadtluft Macht Frei
                          Killing it is the new killing it
                          Ultima Ratio Regum

                          Comment


                          • #43
                            ^^Asher

                            The right way to do it
                            12-17-10 Mohamed Bouazizi NEVER FORGET
                            Stadtluft Macht Frei
                            Killing it is the new killing it
                            Ultima Ratio Regum

                            Comment


                            • #44
                              Originally posted by KrazyHorse
                              Oops.

                              I forgot what a total order on a set was (as opposed to on a field)...
                              In my defence, I was hung over when I posted that...
                              12-17-10 Mohamed Bouazizi NEVER FORGET
                              Stadtluft Macht Frei
                              Killing it is the new killing it
                              Ultima Ratio Regum

                              Comment


                              • #45
                                .

                                Comment

                                Working...
                                X