99 Bottles of Beer

"99 Bottles of Beer" or "100 Bottles of Pop on the Wall" is a traditional reverse counting song from the United States and Canada. It is popular to sing on road trips, as it has a very repetitive format which is easy to memorize and can take a long time when sung in full. In particular, the song is often sung by children on long school bus trips, such as class field trips, family road trips, or on Scout or Girl Guide outings. In computer science, printing the lyrics of "99 Bottles of Beer" is a commonly used task to demonstrate esoteric programming languages.

History

Variations of the song include "ninety nine blue bottles a-hanging on the wall",[1] "Forty-nine Blue Bottles", and "Forty-nine 'Possums" (an "old game song" with lyrics such as "Take one away and there will be / Forty-eight 'possums hanging on a tree."[2]).[3] The "blue bottles" may refer to blue bottle flies.[3][4] Some variant of the song has existed since at least "shortly after the Civil War", estimated as 1860s or early 1870s.[3][5]

This song has been popular amongst college students.[3] One version of the melody and lyrics[6][7][8] is:

<<
    \new Staff << \key d \major \relative c' { \new Voice = "main tune"
        d8 d d4 fis8 a4. e8 e e fis d4 r
        d'8 d d4 d8 a4. b8 b cis d a4 r
        d d8 d d2 b4 d a2
        d,8 d d4 fis8 a4. e8 d e fis d2 \bar ":|."
    } >>
    \new Lyrics \lyricsto "main tune" << \lyricmode {
        For -- ty nine bot -- tles hang -- ing on the wall,
        For -- ty nine bot -- tles ha -- nging on the wall;
        Take one a -- way from them all,
        For -- ty eight bott -- les hang -- ing on the wall.
    } >>
    % sequences of notes generated
    % from https://babel.hathitrust.org/cgi/pt?id=uc1.32106001346193&seq=105
    % using https://github.com/liebharc/homr and musicxml2ly
    \new PianoStaff <<
        \new Staff << \key d \major \relative fis' {
            <fis d a>4 <fis d a>4 <fis d a>4 <fis d a>4 | % 2
            <g cis, a>4 <g cis, a>4 <fis d a>4 <fis d a>4 | % 3
            <fis d a>4 <fis d a>4 <fis d a>4 <fis d a>4 | % 4
            <g d b>4 <g d b>4 <fis d a>4 <fis d a>4 \break | % 5
            <fis d a>4 <fis d a>4 <fis d a>4 <fis d a>4 | % 6
            <g d b>4 <g d b>4 <fis d a>4 <fis d a>4 | % 7
            <fis d a>4 <fis d a>4 <fis d a>4 <fis d a>4 | % 8
            <g cis, a>4 <g cis, a>4 <fis d a>2 \bar ".."
        } >>
        \new Staff << \key d \major \relative d { \clef "bass"
            d4 d4 d4 d4 | % 2
            cis4 a4 d4 d4 | % 3
            d4 d4 d4 d4 | % 4
            g,4 g4 d'4 d4 \break | % 5
            d4 d4 d4 d4 | % 6
            g4 g4 d4 d4 | % 7
            d4 d4 d4 d4 | % 8
            a4 a4 d2 \bar ".."
        } >>
    >>
>>

Another melody is:[9]

% sequences of notes generated
% from https://babel.hathitrust.org/cgi/pt?id=uc1.32106001346193&seq=105
% using https://github.com/liebharc/homr and musicxml2ly
% and then manually corrected
% TODO: add missing dynamics and articulation
<<
    \new PianoStaff <<
        \new Staff << \key d \major \relative c' { \new Voice = "1"
            d8. d16 d4 fis8 a4. |
            e8. e16 e8. fis16 d4 r4 | \noBreak
            <fis d' a>8. d'16 <fis, d' a>4 << { d'8 a4. } \\ { <fis a>2 } >> |
            << { b8. b16 cis8. d16 } \\ { <d, g>2 } >> <d fis a>4 r4 | \break
            <fis d' a>4 <fis d' a>8. d'16 <fis, d' a>2 |
            <g d b'>4 <g d' d, b'>4 <fis d a'>2 |
            d8. d16 d4 fis8 a4. |
            << { e8. d16 e8. fis16 } \\ { <g, cis>2 } >> d'4 r4 \fermata \bar ".."
        } >>
        \new Lyrics \lyricsto "1" << \lyricmode {
            For -- ty nine bot -- tles hang -- ing on the wall,
            For -- ty nine bot -- tles ha -- nging on the wall,
            Take one a -- way from them all,
            For -- ty eight bott -- les hang -- ing on the wall.
        } >>
        \new Staff << \key d \major \relative d { \clef "bass"
            <fis d a'>8 r8 <fis d a'>8 r8 <fis d a'>8 r8 <fis d a'>8 r8 |
            <g cis, a>8 r8 <g cis, a>8 r8 <fis d>8 r8 d,8 -> r8 | \noBreak
            <d' d,>8 r8 <d d,>8 r8 <d d,>8 r8 <d d,>8 r8 |
            <g, d'>8 r8 <g d'>8 r8 <d' d,>8 r8 d,8 -> r8 | \break
            <d' d,>8 r8 <d d,>8 r8 <d d,>8 r8 d,8 -> r8 |
            <g d'>8 r8 <g d'>8 r8 <d' d,>8 r8 d,8 -> r8 |
            <fis' d a'>8 r8 <fis d a'>8 r8 <fis d a'>8 r8 <fis d a'>8 r8 |
            a,8 r8 a8 r8 <d d,>8 r8 d,8 r8 \fermata \bar ".."
        } >>
    >>
>>

By 1898, a variation existed with the modern bottle count of 99 and the bottles specified as beer bottles.[10]

Lyrics

The song's lyrics are as follows, beginning with n=99:[11][12]

(n) bottles of beer on the wall.
(n) bottles of beer.
Take one down, pass it around,
(n−1) bottles of beer on the wall.


\layout { \set Score.tempoHideNote = ##t \context { \Score \remove "Bar_number_engraver" } }
{ \key g \major \time 3/4 \tempo 4.=210 \set Staff.midiInstrument = #"harmonica" \relative c''
  { g4 g g | d d d | g g g | g2. |
    a4 a a | e e e | a2.~ | a2. |
    fis2 fis4 | fis2. | fis4 fis fis | fis2. |
    d4 d d | d e fis | g g g | g2. \bar ":|."
  }
  \addlyrics { Nine -- ty nine bot -- tles of beer on the wall,
  nine -- ty nine bot -- tles of beer.
  Take one down, pass it a -- round,
  nine -- ty eight bot -- tles of beer on the wall.}
}

[13]

The same verse is repeated, each time with one bottle fewer, until there are none left. Variations on the last verse following the last bottle going down include lines such as:

No more bottles of beer on the wall,
no more bottles of beer.
Go to the store and buy some more,
99 bottles of beer on the wall...

Or:

No more bottles of beer on the wall,
no more bottles of beer.
We've taken them down
and passed them around;
now we're drunk and passed out!

Other alternate lines read:

No more bottles of beer on the wall,
no more bottles of beer.
There's nothing else to fall,
because there's no more bottles of beer on the wall.

Alternatively, the verse for the last one can be modified instead, such as:

If that one bottle should happen to fall,
what a waste of alcohol!

Or:[14][15][16]

And if that green bottle should accidentally fall,
There'd be nothing but the smell a-hanging on the wall.

Or the song does not stop at the last "1" or "0" bottles of beer but continues counting with

−1 (Negative one) bottles of beer on the wall
Take one down, pass it around,
−2 (negative 2) bottles of beer on the wall...

continuing onward through the negative numbers.

Another option is to count back up by saying "Add one bottle to them all."[6][7]

Full-length recitals

Singing all verses takes an extraordinarily long time. The American comedian Andy Kaufman used this for comedic effect early in his career when he actually sang all 100 verses.[17]

Atticus, a band from Knoxville, Tennessee, recorded a thirteen and a half minute live version of the song in its entirety at the Glasgow Cathouse in Scotland. It was included in the 2001 album Figment. Rich Stewart aka Homebrew Stew listed it as the number one drinking song out of 86 in an article for Modern Drunkard Magazine the following year.[18]

Mathematically inspired variants

Donald Byrd has collected dozens of variants inspired by mathematical concepts and written by himself and others.[19] (A subset of his collection has been published.[20]) Byrd argues that the collection has pedagogic as well as amusement value. Among his variants are:

  • "Infinity bottles of beer on the wall". If one bottle is taken down, there are still infinite bottles of beer on the wall (thus creating an unending sequence much like "The Song That Doesn't End").
    • "Aleph-null bottles of beer on the wall". Aleph-null is the size of the set of all natural numbers, and is the smallest infinity and the only countable one; therefore, even if an infinite aleph-null of bottles fall, it could still be true that the same amount remains.
    • "Aleph-one/two/three/etc. bottles of beer on the wall". Aleph-one, two, three, etc. are uncountable infinite sets, which are larger than countable ones; therefore, if only a countable infinity of bottles fall, an uncountable number remains.

Other versions in Byrd's collection involve concepts including geometric progressions, differentials, Euler's identity, complex numbers, summation notation, the Cantor set, the Fibonacci sequence, and the continuum hypothesis, among others.

References in computer science

The computer scientist Donald Knuth proved that the song has a complexity of in his in-joke-article "The Complexity of Songs".[21]

Numerous computer programs exist to output the lyrics to the song. This is analogous to "Hello, World!" programs, with the addition of a loop. As with "Hello, World!", this can be a practice exercise for those studying computer programming, and a demonstration of different programming paradigms dealing with looping constructs and syntactic differences between programming languages within a paradigm.

The program has been written in over 1,500 different programming languages.[22]

Example

# include <stdio.h>
# include <stdbool.h>

int main(void) {
  for (size_t i = 99; i > 0; i--) {
    printf("%zu bottle%s of beer on the wall, %zu bottle%s of beer.\nTake one down & pass it around, now there's ",
           i, (i == 1 ? "" : "s"), i, (i == 1 ? "" : "s"));

    printf((i > 1) ? "%zu bottle%s of beer on the wall\n"
                   : "no more bottles of beer on the wall!\n",
           i - 1, i==2?"":"s");
  }
}
fn main() {
    for i in (3..100).rev() {
        println!(
            "{i} bottles of beer on the wall,\n\
             {i} bottles of beer.\n\
             Take one down and pass it around,\n\
             now there's {} more bottles of beer on the wall!\n",
            i - 1
        );
    }
    println!(
        "2 bottles of beer on the wall,\n\
         2 bottles of beer.\n\
         Take one down and pass it around,\n\
         now there's 1 more bottle of beer on the wall!\n",
    );
    println!(
        "1 bottle of beer on the wall,\n\
         1 bottle of beer.\n\
         Take one down and pass it around,\n\
         there's no more bottles of beer on the wall!"
    );
}
verses :: [String]
verses =
    "1 bottle of beer on the wall, 1 bottle of beer.\nTake one down and pass it around, there's no more bottles of beer on the wall!"
    : "2 bottles of beer on the wall, 2 bottles of beer.\nTake one down and pass it around, now there's 1 more bottle of beer on the wall!"
    : map (\n -> show n
        ++ " bottles of beer on the wall, "
        ++ show n
        ++ " bottles of beer.\nTake one down and pass it around, now there's "
        ++ show (n-1)
        ++ " more bottles of beer on the wall!") [3..]

main :: IO ()
main = mapM_ putStrLn (reverse $ take 99 verses)
n_bottles = 99
for n in range(n_bottles, 0, -1):
    print(f"{n} bottles of beer on the wall.")
    print(f"{n} bottles of beer.")
    print("Take one down, pass it around,")
    print(f"{n-1} bottles of beer on the wall\n")

print("No more bottles of beer on the wall,")
print("no more bottles of beer.")
print("Go to the store and buy some more,")
print("99 bottles of beer on the wall...")
positive_bottles <- function(n) {
  s  <- ifelse(n > 1, "s", "")
  "{n} bottle{s} of beer on the wall.
{n} bottle{s} of beer.
If one of the bottles just happen to fall,
{n-1} bottles of beer on the wall." |> glue::glue()
}

zero_bottles <- "No more bottles of beer on the wall,
no more bottles of beer.
There's nothing else to fall,
because there's no more bottles of beer on the wall."

for (i in 99:1)
  positive_bottles(i) |> cat("\n\n")
cat(zero_bottles)

See also

  • "Potje met vet" – a traditional Dutch song sung in the same style
  • "Ten Green Bottles" – a similar song which is popular in the United Kingdom

References

  1. ^ Netzer, Roland Lee (2000). "Ninety Nine Bottles Of Beer On The Wall [...]". Echoes from the Hills: a Defined Guide to Country Sayings. Vol. I. Internet Archive (1st ed.). Springfield, Missouri: Echo Publishing. p. 136. ISBN 0-9625768-0-8. Internet Archive echoesfromhillsd0000netz.
  2. ^ Armitage, M. Teresa (1925). "Forty-Nine 'Possums". Folk Songs & Art Songs: For Intermediate Grades. The Laurel Music Series. Vol. I (Teachers' ed.). Boston: C. C. Birchard & Company. p. 71. Google Books zMe8x-x_Z8sC. HathiTrust record 101695226, item umn.31951002310928c.
  3. ^ a b c d Shepard, Riley (1983). "No. 1233: Ninety-Nine Blue Bottles". The Master Book of American Folk Song: An Encyclopedia of the Traditional Music and Folk Songs of the United States. Porterville, Ca. pp. 3525–3526. Internet Archive masterbookofamericanfolksong00shep.{{cite book}}: CS1 maint: location missing publisher (link)
  4. ^ White, Newman Ivey; et al., eds. (1952). "190: Ninety-Nine Blue Bottles". The Frank C. Brown Collection of North Carolina Folklore: The Folklore of North Carolina collected by Dr. Frank C. Brown during the Years 1912 to 1943 in Collaboration with The North Carolina Folklore Society of which he was Secretary-Treasurer 1913-1943. Vol. III: Folk Songs from North Carolina. Reported by K. P. Lewis as obtained in 1910 from Dr. Kemp P. Battle of Chapel Hill. Duke University Press. p. 226. Internet Archive frankcbrowncolle03fran.
  5. ^ Randolph, Vance, ed. (1980). "456: Ninety-Nine Blue Bottles" [From Mrs. Hugo Blair, Joplin, Mo., Sept. 4, 1929.]. Ozark Folksongs. Vol. III: Humorous and Play-Party Songs (Revised ed.). University of Missouri Press. p. 210. ISBN 0-8262-0299-3. LCCN 79-3611. Internet Archive ozarkfolksongs0003rand.
  6. ^ a b Howe, James Hamilton, ed. (1890). "("Poor 'Boz' where art thou?") Forty-Nine Bottles.". Songs of DePauw: a collection of college songs. J. M. Russell. p. 39. Internet Archive songsdepauw00howegoog. Google Books MbQQAAAAYAAJ.
  7. ^ a b "Forty-Nine Bottles". The Most Popular College Songs: Selected from Songs of All the Colleges; Songs of the Eastern Colleges and Songs of the Western Colleges (Revised ed.). New York City: Hinds, Noble & Eldredge. 1904–1906. p. 37. Google Books 0bw4AQAAMAAJ, AS5GAQAAMAAJ. HathiTrust record 012297627, item pst.000014111396; record 100593554, item osu.32435060345931.
  8. ^ "Forty-Nine Bottles". Songs That Never Grow Old: A complete collection of all those standard songs which are known and loved by English-speaking people the world over. Copyright 1909, by North American Music Pub. Co.; 1913, by F. E. Wright. New York: Syndicate Publishing Co. p. 85. HathiTrust record 008005490, item uc1.32106001346193.{{cite book}}: CS1 maint: others (link)
  9. ^ Wier, Albert E., ed. (1915). "Forty-Nine Bottles". Songs the Whole World Sings: Containing more than two hundred songs which are dear to the hearts of young and old in every nation. D. Appleton and Company. p. 158. Google Books HrMQAAAAYAAJ. HathiTrust record 100339840, item hvd.32044040881617.
  10. ^ "Ladies' Column". Queen's University Journal. Vol. XXVI [26], no. 2. November 26, 1898. p. 35. Internet Archive 8_06785_68, queensjournal26.
  11. ^ Nyberg, Tim (2006). 99 Bottles of Beer on the Wall: The Complete Lyrics. Andrews McMeel Publishing. p. 112. ISBN 978-0-7407-6074-7.
  12. ^ Baird, Kevin C. (2007). Ruby by example: concepts and code. No Starch Press. p. 25. ISBN 978-1-59327-148-0.
  13. ^ Cohen, Norm (2005). Folk Music: A Regional Exploration. Greenwood Press. p. 60. ISBN 0-313-32872-2.
  14. ^ Wood, Thomas, ed. (1928). "59: Green Bottles". The Oxford Song Book. Vol. II. Oxford University Press. p. 94. Google Books XbU7AQAAIAAJ.
  15. ^ "English without Tears : Lekcja siedemdziesiąta trzecia : „TEN GREEN BOTTLES” (a well-known English song)" [translated as: „DZIESIĘĆ ZIELONYCH FLASZEK” (znana piosenka anqielska)]. Głos Anglii: tygodniowy przegląd spraw brytyjskich. Vol. II [2], no. 34 (43). Brytyjskie Ministerstwo Spraw Zagranicznych. August 23, 1947 [Transmisja 25 i 26 sierpnia]. p. 11. Internet Archive jbc.bj.uj.edu.pl.NDIGCZAS102144_1947_034.
  16. ^ Wood, James H. (1959) [first published 1953]. "393: Ten Green Bottles". The Youth Sing Book With Music (Revised ed.). London: The Pilgrim Press. pp. 384–385. Internet Archive youthsingbook0000unse.
  17. ^ Patton, Charlie (December 23, 1999). "Ever-annoying Andy Kaufman gets last laugh | Jacksonville.com". Archived from the original on February 1, 2018. Retrieved September 15, 2012.
  18. ^ Stewart, Rich. "Rhythm and Booze: The Top 86 Drinking Songs". Modern Drunkard Magazine. Retrieved December 13, 2018.
  19. ^ Byrd, Donald (November 30, 2015). "Infinite Bottles of Beer: Mathematical Concepts with Epsilon Pain, Or: A Cantorial Approach to Cantorian Arithmetic and Other Mathematical Melodies" (PDF). Indiana University, School of Informatics. Retrieved March 26, 2020.
  20. ^ Donald Byrd (2010). "Infinite Bottles of Beer: A cantorial approach to Cantorian arithmetic and other mathematical melodies". Math Horizons: 16–17.
  21. ^ Knuth, Donald. "The Complexity of Songs" (PDF). Retrieved September 2, 2020.
  22. ^ "Welcome to 99 Bottles of Beer". 99-bottles-of-beer.net.