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

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

    In other words, what 5 letters (not necessarily distinct) together can make up the most distinct 5 letter words.

    So far I can think of an 11 (11 different words made with the same 5 letters)
    12-17-10 Mohamed Bouazizi NEVER FORGET
    Stadtluft Macht Frei
    Killing it is the new killing it
    Ultima Ratio Regum

  • #2
    what is your word you have in mind?
    "I hope I get to punch you in the face one day" - MRT144, Imran Siddiqui
    'I'm fairly certain that a ban on me punching you in the face is not a "right" worth respecting." - loinburger

    Comment


    • #3
      apres
      asper
      pears
      spear
      rapes
      reaps
      pares
      parse
      prase
      spare
      presa

      (the last one is iffy; it's a breed of dog and might be considered a proper noun)
      12-17-10 Mohamed Bouazizi NEVER FORGET
      Stadtluft Macht Frei
      Killing it is the new killing it
      Ultima Ratio Regum

      Comment


      • #4
        Well, hell. I must say that I managed to impress myself with Haskell.

        Code:
        module Main where
        import Data.List
        import Data.Char
        
        length_order a b = let l_a = length a
        		       l_b = length b
        		       order | l_a == l_b = EQ
        			     | l_a < l_b  = LT
        			     | l_a > l_b  = GT
        		       in order
        
        main = interact $
               (\line -> unlines . take 1 . last . sortBy length_order 
               . group . sort . map sort . map (map toLower) 
               . filter (\line -> length line == 5) $ words line)
        (a couple of hours later, I realised that length_order was comparing in reverse... I'd just quickly hacked it up in order to get the right result. Fixed.)

        This code finds out that the letter combination to look out for is "agnor" (in alphabetic order, all-lowercase). Here's another program, to find out what words actually anagrammize to that:

        Code:
        module Main where
        import Data.List
        import Data.Char
        
        main = interact $
               (\input -> unlines $ filter 
        	(\word -> (sort (map toLower word)) == "agnor") $ lines input)
        Code:
        angor
        argon
        goran
        grano
        groan
        nagor
        Orang <-- please remember I've been
        orang <-- using a Unix for 7 years
        organ
        rogan
        Ronga

        (the source for these words is, of course, /usr/share/dict/words, aka Webster's Second International, from 1934)
        Last edited by Ari Rahikkala; December 1, 2006, 19:47.
        This is Shireroth, and Giant Squid will brutally murder me if I ever remove this link from my signature | In the end it won't be love that saves us, it will be mathematics | So many people have this concept of God the Avenger. I see God as the ultimate sense of humor -- SlowwHand

        Comment


        • #5
          Does any language count?
          So get your Naomi Klein books and move it or I'll seriously bash your faces in! - Supercitizen to stupid students
          Be kind to the nerdiest guy in school. He will be your boss when you've grown up!

          Comment


          • #6
            Haskell

            It's not that hard to do something similar in a normal language

            Comment


            • #7
              Originally posted by Ari Rahikkala
              Well, hell. I must say that I managed to impress myself with Haskell.
              Here's mine. A combination of C and bash:

              First I took a wordlist (only 5 letter words) with one word on each line. Then I used gedit to add in a series of bash commands (using find/replace on the newlines) so I got a second file like this.

              5letscr.sh

              Code:
              #!/bin/bash
              
              bash jmb2.sh abaca
              .
              .
              .
              bash jmb2.sh zymes
              jmb2.sh

              Code:
              #!/bin/bash
              gcc -o jmb2.out jmb2.c
              echo $1 > jmbtmpfile
              ./jmb2.out < jmbtmpfile > words2.sh
              rm jmbtmpfile
              bash ./words2.sh
              jmb2.c

              Code:
              #include 
              #include  
              
              int rvd5(int a, int b, int c, int d, int e);
              int rvd6(int a, int b, int c, int d, int e, int f);
              
              main()
              
              {
              
              	char word[80];
                int count, tag, i, j, k, l, m, n;
                
              	for (count=0; (word[count] = getchar()) != '\n'; ++count)
              		;
              	tag = count;
              		
              	printf ("#!/bin/bash\n");
              	printf ("rm -f jmbtmpfile\n");
              
              	if (tag == 5) {
              	for (i = 0; i <= 4; i++){
              		for (j = 0; j <= 4; j++){
              			for (k = 0; k <= 4; k++){
              				for (l = 0; l <= 4; l++){
              					for (m = 0; m <= 4; m++){
              						if (rvd5(i,j,k,l,m) != 0)
              							printf("grep -c \'%c%c%c%c%c\' 5letlist.txt >> jmbtmpfile \n", word[i], word[j], word[k], word[l], word[m]);
              					}
              				}
              			}
              		}
              	}
              	}
              	
              	if (tag == 6) {
              	for (i = 0; i <= 5; i++){
              		for (j = 0; j <= 5; j++){
              			for (k = 0; k <= 5; k++){
              				for (l = 0; l <= 5; l++){
              					for (m = 0; m <= 5; m++){
              						for (n = 0; n <= 5; n++){
              							if (rvd6(i,j,k,l,m,n) != 0)
              								printf("grep -c \'%c%c%c%c%c%c\' 6letlist.txt >> jmbtmptile \n", word[i], word[j], word[k], word[l], word[m], word[n]);
              						}
              					}
              				}
              			}
              		}
              	}
              	}
              	
              	printf("grep -c \'1\' jmbtmpfile \n");
              
              }
              
              int rvd5(int a, int b, int c, int d, int e)
              
              {
              
              	int ans = 1;
              	
              	if (a == b)
              		ans = 0;
              	if (a == c)
              		ans = 0;
              	if (a == d)
              		ans = 0;
              	if (a == e)
              		ans = 0;
              	if (b == c)
              		ans = 0;
              	if (b == d)
              		ans = 0;
              	if (b == e)
              		ans = 0;
              	if (c == d)
              		ans = 0;
              	if (c == e)
              		ans = 0;
              	if (d == e)
              		ans = 0;
              		
              	return(ans);
              	
              }
              
              int rvd6(int a, int b, int c, int d, int e, int f)
              
              {
              
              	int ans = 1;
              	
              	if (a == b)
              		ans = 0;
              	if (a == c)
              		ans = 0;
              	if (a == d)
              		ans = 0;
              	if (a == e)
              		ans = 0;
              	if (a == f)
              		ans = 0;
              	if (b == c)
              		ans = 0;
              	if (b == d)
              		ans = 0;
              	if (b == e)
              		ans = 0;
              	if (b == f)
              		ans = 0;
              	if (c == d)
              		ans = 0;
              	if (c == e)
              		ans = 0;
              	if (c == f)
              		ans = 0;
              	if (d == e)
              		ans = 0;
              	if (d == f)
              		ans = 0;
              	if (e == f)
              		ans = 0;
              		
              	return(ans);
              	
              }
              12-17-10 Mohamed Bouazizi NEVER FORGET
              Stadtluft Macht Frei
              Killing it is the new killing it
              Ultima Ratio Regum

              Comment


              • #8
                We wrote that program correctly in my sophomore year of HS

                Comment


                • #9
                  I'm a ****ty programmer

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

                  Comment


                  • #10
                    I remember writing a variant that cheated on Text Twist

                    Comment


                    • #11
                      Mine was originally written to cheat on the jumble in the paper. That's why it's roundabout. I already had something written. And that's why it's called jmb2.c and jmb2.sh...
                      12-17-10 Mohamed Bouazizi NEVER FORGET
                      Stadtluft Macht Frei
                      Killing it is the new killing it
                      Ultima Ratio Regum

                      Comment


                      • #12
                        It took ~5 minutes to adapt to this purpose...and I wanted practice scripting in bash...
                        12-17-10 Mohamed Bouazizi NEVER FORGET
                        Stadtluft Macht Frei
                        Killing it is the new killing it
                        Ultima Ratio Regum

                        Comment


                        • #13
                          You're probably better than I am a bash scripting. I just use linux for Matlab and C.

                          Comment


                          • #14
                            So, how's your probability class going?

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

                            Comment


                            • #15
                              Originally posted by Kuciwalker
                              You're probably better than I am a bash scripting. I just use linux for Matlab and C.
                              I wrote my first bash script two days ago
                              12-17-10 Mohamed Bouazizi NEVER FORGET
                              Stadtluft Macht Frei
                              Killing it is the new killing it
                              Ultima Ratio Regum

                              Comment

                              Working...
                              X