File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programming Diversions and the fly likes All Vowels in an Integer Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Other » Programming Diversions
Bookmark "All Vowels in an Integer" Watch "All Vowels in an Integer" New topic
Author

All Vowels in an Integer

Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
What is the first integer where all of the vowels are included in it?

Eric
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11161
    
  16

negative four googoleplex?


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

one hundred and five?


[Jess in Action][AskingGoodQuestions]
Ryan McGuire
Ranch Hand

Joined: Feb 18, 2005
Posts: 1006
    
    3
Originally posted by Ernest Friedman-Hill:
one hundred and five?


Where's the 'y'?
[ May 08, 2006: Message edited by: Ryan McGuire ]
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

You want a 'y'? Then one hundred and thirty.
Ryan McGuire
Ranch Hand

Joined: Feb 18, 2005
Posts: 1006
    
    3
Originally posted by Paul Clapham:
You want a 'y'? Then one hundred and thirty.


One hundred and twenty five.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
I would not use and...

Eric
Ryan McGuire
Ranch Hand

Joined: Feb 18, 2005
Posts: 1006
    
    3
Originally posted by Eric Pascarello:
I would not use and...


So what answer were you looking for? A hundred thirty-one? One thousand five?
[ May 08, 2006: Message edited by: Ryan McGuire ]
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11161
    
  16

i'm still not sure what you mean by "first" integer. there is no first, because for any integer you can name, i can name an infinite more that are to the left of it on the numberline.

if you mean first POSITIVE integer, that's different.

according to The Straight Dope, w can also sometimes be a vowel.
Dictionary.com also claims that l, m, n, and r are potenially vowels...
[ May 08, 2006: Message edited by: fred rosenberger ]
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

Originally posted by Eric Pascarello:
I would not use and...

Eric
I always use and.
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11161
    
  16

I remember being taught that "and" was used for the decimal part of a float.

"one hundred and forty-four" is wrong.

"one hundred forty-four" is correct.

"seven and three tenths" is correct.
Ryan McGuire
Ranch Hand

Joined: Feb 18, 2005
Posts: 1006
    
    3
Originally posted by fred rosenberger:
I remember being taught that "and" was used for the decimal part of a float.

"one hundred and forty-four" is wrong.

"one hundred forty-four" is correct.

"seven and three tenths" is correct.


Ok then, let's try "zero and eight fourths" (0 8/4). That is merely a mixed number that evaluates to an integer value.
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

final int aeiouy = 0;

Clearly 0 is the answer
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

Originally posted by fred rosenberger:
I remember being taught that "and" was used for the decimal part of a float.

"one hundred and forty-four" is wrong.

"one hundred forty-four" is correct.

"seven and three tenths" is correct.
I wasn't ever taught any of those things that I can remember, or anything like them. I just learned how to say numbers from everybody else just like people regularly learn language. So to me, "one hundred forty-four" sounds like a specialized American usage.
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
This may be of some interest: American and British English Differences: Numbers.

I wonder... what if we consider all 26 letters used in English. What's the largest number of different letters that can be incorporated in the representation of a single positive integer? And what is the smallest integer that achieves this?

For purposes of this problem, please consider only standard counting emthods (albeit perhaps extended for somewhat larger numbers than we usually see). No fractions, no formulas, no, Java source code. You can include or omit "and" anywhere it serves your purposes as long as it's "standard" somewhere that speaks a form of English - I don't think it will matter much. But there's no "zero thousand" or "... and zero". No zero anywhere you don't need it. And no "zillion" either. If you can find a more plausible-sounding way to insert a z somewhere, have at it.


"I'm not back." - Bill Harding, Twister
Steve Fahlbusch
Bartender

Joined: Sep 18, 2000
Posts: 557
    
    7

if i use and then the answer if nine
Ryan McGuire
Ranch Hand

Joined: Feb 18, 2005
Posts: 1006
    
    3
If "first" is defined as "closest to zero", I'd go with "negative four".
George Harris
Ranch Hand

Joined: May 05, 2003
Posts: 84
Jim, I was able to get in 23 letters with:

1,001,000,000,001,000,001,001,024,678

I couldn't figure out how to use J, K or Z
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

french: quarantetrois (43).
german: Einemilliontausend. (1001000)


http://home.arcor.de/hirnstrom/bewerbung
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
George: I got the same 23 letters using

1,001,000,000,001,000,001,001,002,568

Which is pretty close to your answer, all things considered. Good job.
George Harris
Ranch Hand

Joined: May 05, 2003
Posts: 84
Actually Jim if you can write your positive integer with some precision(2), we have the answer for the 'Z'

1,001,000,000,001,000,001,001,002,568.00
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
Hmmm. To my mind it's no longer an integer if you do that. Still, that may be as close as we can come.
Rob Acraman
Ranch Hand

Joined: Dec 03, 2000
Posts: 89
You could have a dozen billion:

1,001,000,000,001,012,001,001,002,568
George Harris
Ranch Hand

Joined: May 05, 2003
Posts: 84
251,000,000,000,000,001,001,002,568.00 could be the lower answer...

A quarter octillion, one septillion, etc.
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
Well, you guys are thinking outside the box at least, I'll give you that...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: All Vowels in an Integer
 
Similar Threads
Translation and language comparison
what are the return values of init method in servlets
JavaRanch for Linux ???
Pick the odd man out
random strings