---
created_at: '2015-12-29T17:54:18.000Z'
title: Bill Gates and Petals Around the Rose (2003)
url: http://www.borrett.id.au/computing/petals-bg.htm
author: RKoutnik
points: 59
story_text: 
comment_text: 
num_comments: 26
story_id: 
story_title: 
story_url: 
parent_id: 
created_at_i: 1451411658
_tags:
- story
- author_RKoutnik
- story_10807963
objectID: '10807963'

---
[Source](http://www.borrett.id.au/computing/petals-bg.htm "Permalink to Lloyd Borrett - Computing - Petals - Bill Gates plays Petals Around the Rose")

# Lloyd Borrett - Computing - Petals - Bill Gates plays Petals Around the Rose


| ----- |
|  ![Lloyd Robert Borrett][1] | 

|  ![][2]  

  search  |  
| 

  [home][3] | [about][4] | [weird mob][5] | [computing][3] | [interests][6] | [insight][7]   [.][8]

 |   | |

 | 

> [contact Lloyd][9]  
> [Lloyd's blog][10]  
> [forums][11]  
![][2]

 |     
![Follow Lloyd on Twitter][12] ![Friend Lloyd on Facebook][13] ![Connect with Lloyd on LinkedIn][14] ![Follow Lloyd on Pinterest][15] | 

| ----- |
|  ![Computing][16]   

|   ![][17] Reading  

 ![][18] [Advertising][19]  
 ![][18] [Business][20]  
 ![][18] [Computing][21]  
 ![][18] [Flying][22]  
 ![][18] [Horsemanship][23]  
 ![][18] [Magazines][24]  
 ![][18] [Management][25]  
 ![][18] [Marketing][26]  
 ![][18] [Microsoft][27]  
 ![][18] [Motorcycles][28]  
 ![][18] [One to One][29]  
 ![][18] [Permaculture][30]  
 ![][18] [Sailing][31]  
 ![][18] [Web Design][32]  
 ![][18] [Web Graphics][33]  

 ![][17] Computing  

 ![][18] [General Software][34]  
 ![][18] [Graphics Software][35]  
 ![][18] [Simulation Software][36]  
 ![][18] [Web Software][37]  

 ![][17] Music & Video  

 ![][18] [Classic Albums][38]  
 ![][18] [DVDs][39]  
 ![][18] [Listening To][40]  
 ![][18] [Lloyd's Top 10 CDs][41]  
 

 | 

  
![][2] |  ![][2]

| ----- |
| 

# Bill Gates and  
Petals Around the Rose

It was June 1977, the very early days of the microcomputer industry. The founders of Microsoft, Bill Gates and Paul Allen, were amongst those heading home to Albuquerque from the National Computer Conference in Dallas. In the September/October 1977 edition of "Personal Computing" magazine, Henry Gilroy provided the following report on the introduction of the _**Petals Around the Rose**_ brain teaser to his fellow travelers on the return journey.

> Heading back to Albuquerque on a hot, humid Texas evening, the party from Personal Computing fell in with a gang from Microsoft. A couple of MITs folks were also in the crowd. Luckily, an ideal distraction for computer types was available.
> 
> The name of the game is _Petals Around the Rose_, and that name is significant. Newcomers to the game can be told that much. They can also be told that every answer is zero or an even number. They can also be told the answer for every throw of the dice that are used in the game. And that's all the information they get.
> 
> The person who has the dice and knows the game, rolls five dice and remarks almost instantly on the answer. For example: in Roll #1 the answer is two.

Roll #1. ![4][42] ![1][43] ![6][44] ![3][45] ![6][46]

> "The answer is what?" says the new player.
> 
> "Two."
> 
> "On that roll?"
> 
> "Yes."
> 
> "Would it still be two if I moved the dice without turning any of them over, just rearranging the pattern?"
> 
> "I can tell you only three things: the name of the game, the fact that the answer is always even, and the answer for any particular throw. In this case the answer is two."
> 
> "So that's how it is. What am I supposed to do?"
> 
> "You're supposed to tell me the answer before I tell you. I'll give you all the time you want, but don't tell me your theory, just the answer. If you figure it out, you don't want to give the idea away to these other jokers around you. Make them work for the answers, too. If you get the answer right on six successive rolls, I'll take that as prima facie evidence that you understand the game."
> 
> "OK, roll again."

Roll #2. ![5][47] ![6][46] ![5][48] ![4][42] ![4][49]

> "I give up. What's the answer?"
> 
> "The answer is eight."
> 
> "Roll again."

Roll #3. ![3][50] ![5][48] ![5][51] ![5][47] ![6][52]  
The answer is fourteen.

Roll #4. ![2][53] ![6][44] ![2][54] ![1][43] ![4][49]  
The answer is zero.

Roll #5. ![4][49] ![3][55] ![2][54] ![1][43] ![3][50]  
The answer is four.

Roll #6. ![6][44] ![5][51] ![6][56] ![2][53] ![2][57]  
The answer is four again.

> By this time — it's a warm night at the Dallas Airport — half a dozen people, friends and strangers, are sitting on the floor around the _Potentate of the Rose_, snorting and guffawing in disgust while guessing consistently wrong on the answers. Security types stop occasionally to give steely glances at the proceedings, and waiting strangers stop reading to listen to the discussion. Some blush at the language.

Roll #7. ![4][58] ![3][55] ![4][59] ![1][60] ![2][57]  
The answer is two.

> Some people, like Personal Computing's Marketing Coordinator, Louise, catch on in half a dozen rolls, shrugging the whole thing off as trivial. Mark James, the Seer of Comex at USC (who gave us the game in the first place), observes that many brilliant, learned folk who visit their establishment and subject themselves to this, depart hours later without the answer. Many draw sketches of the throws and carry the sketches off to laboratories for study among the boiling cauldrons and croaking ravens. Weeks later, they may call Comex with proposed answers based on elaborate (and expensive) computer analyses of the game. The answers proposed are more often wrong than right. Petals Around the Rose may be almost as great a drag on the national economy as Star Trek.

Roll #8. ![5][47] ![5][61] ![1][60] ![3][50] ![4][59]  
The answer is ten.

Roll #9. ![4][59] ![4][58] ![5][47] ![3][55] ![2][62]  
The answer is six.

> "Six? It can't be!"

Roll #10. ![5][51] ![3][50] ![4][49] ![3][55] ![5][63]  
The answer is twelve.

> "Well, that shoots my last three algorithms! Gimme a piece of paper so I can work on this. Let me list everything. The name of the game is Petals Around the Rose?"
> 
> "Right, and the name is significant."
> 
> "OK, and the answer is always even."
> 
> "Correct."
> 
> "Can I roll the dice myself or do you have to do it?"
> 
> "Oh, you're welcome to roll them."

Roll #11. ![3][45] ![1][64] ![6][65] ![1][66] ![4][59]

> "Is the answer eight?"

> "No, it's two."
> 
> "Oh hell!"
> 
> "No, that's the answer in another game."
> 
> "Well, it can't be very complicated or you wouldn't be able to spit out the numbers so fast. You spend ten minutes trying to figure out the tip and count your change at breakfast."
> 
> "That's me, all right, but I am mystically suited to this game of _Petals Around the Rose_. Every man has some talent, and this is mine."

Roll #12. ![3][67] ![3][55] ![5][51] ![5][63] ![5][47]  
The answer is sixteen.

> "Wait, we haven't gone that high before. I thought the upper limit was 12."
> 
> "No, we had a fourteen before."
> 
> "Oh yeah, How high can it go?"
> 
> "I can tell you three things..."
> 
> "Aw, shut up and roll!"

Roll #13. ![2][68] ![2][57] ![5][48] ![3][50] ![3][69]  
The answer is eight.

> Steve Wood caught on while we were still in the waiting area at the airport, but the others stayed puzzled until after we got on the plane. After takeoff, it was possible to throw the dice on a fold-down table while leaning over the back of a seat. Seven or so people watched without too much trouble. Rich Weiland caught on after another half hour. Paul Allen's neck got stiff fairly soon and he gave up to read his book. Mark McDonald and **Bill Gates** hung on grimly.
> 
> Funny thing about Bill, he began to get answers right, but not consistently. He admitted that he was remembering throws he'd seen before, along with the answers, but had no plausible theory to account for answers. Remembering?
> 
> "Oh, sure," said the rememberer. "Like this throw...

Roll #14. ![4][42] ![4][59] ![5][70] ![3][69] ![6][46]  
The answer is six. 

> ... it's just like a roll we saw earlier (Roll #9), except that the six this time was a two last time. I don't know why the answer is the same, but it is."
> 
> The rotten kid must have had two dozen rolls, with answers, committed to memory by the time this discussion came up. ("Kid," because he ordered a Shirley Temple at lunch one day just a few months ago, and drank it before the awestricken eyes of his tablemates, some of whom realised that they were at least twice Bill's age. He had taken leave of his undergraduate courses at Harvard to lead this little company, Microsoft, which is creating BASIC and FORTRAN, etc... interpreters and compilers for various microcomputers. No applications software in their product line yet, just system packages that are already making them famous and may at length make them rich. *Sigh.*)
> 
> "I think I'd better use a piece of paper," said Bill, who was by this time the only active player who had still failed to divine the secret.
> 
> "Aha," said he after about an hour and a half of this foolishness. "The answer is four on this roll."

Roll #15. ![1][43] ![3][71] ![2][57] ![3][45] ![2][62]

> "Yes."

Roll #16. ![3][67] ![2][62] ![5][48] ![5][63] ![1][43]

> "And the answer to this is ten."
> 
> He was right again, and he rattled off the next dozen answers without a quiver, declaring that he wasn't just remembering history now but knew what was going on. Like the others he didn't feel cheated by the game, but was satisfied that his effort paid off.
> 
> Actually when you go through this at Comex and finally get the answer, a committee forces you to kneel in the middle of the floor so you can be sworn in as a member of the [Fraternity of Petals Around the Rose][72] while somebody taps you on the shoulders with a piece of wood. (Certain people tend to be kissed during the process. I was struck smartly with a blackboard pointer.) Comex even hands out a nice printed card. We didn't try all this on the airplane.
> 
> The game does work well with real dice. Comex reports that one major convention was largely disrupted when they arranged for the gift shop at the hotel to stock a large supply of dice, then introduced _Petals Around the Rose_ to many conference attendees. "It was amazing," says Mark, "distinguished looking ladies and gentlemen in neat business clothes could be seen crawling on their hands and knees in little working groups all over the hotel. While speakers were saying important things on lecture platforms, the rattle of dice and mutterings about answers almost drowned them out from all over the dimly lit halls. We don't like to do this too often. Makes enemies."
> 
> Even the Microsoft guys agreed that Petals Around the Rose offers a good excuse for doing a bit of applications software. Indeed, Bill scratched out a program for the game on a napkin and passed it over the seat so that it could see daylight in Personal Computing.
> 
> We won't, of course, because it gives away the game. Figure it out and write the program yourself.
> 
> However, we'll give you one line of Bill's program as it is written in pencil on the napkin (which is safe in our vault for evidence). Bill's written program makes us feel much better about dealing with a smart guy who can not only program but can remember all those throws of the dice. Things do even out. The line reads:
>
>> `PRINT "THE NAME OF THE GAME IS PEDAL AROUND THE ROSES"`
> 
> No wonder he was having trouble.

* * *

## No More "Hello World"

Using the above article back in 1977 whilst working at [BHP][73], [Lloyd Borrett][4] wrote a program in Multi-user BASIC running under RDOS on a Data General minicomputer to introduce _Petals Around the Rose_ to Australia. Since then it's been the first program written in each new language and operating environment Lloyd has worked on.

In 1978 it was his first FORTRAN program and in 1979 his first Pascal program. In 1982, Petals Around the Rose was written in ROM BASIC to run on one of the first IBM PCs in Australia, which had a massive 64 Kb of RAM! It's been the first program he wrote using the IBM BASIC and Microsoft QuickBASIC compilers, plus the Borland Turbo C and C++ compilers. Later, it became his first Microsoft Windows program using Microsoft Visual BASIC.

So in 1996, _Petals Around the Rose_ had to be the first Internet related program he would write. Hence the VBScript version using the ActiveX HTML Layout control for use with Microsoft Internet Explorer. And then a few weeks later he came out with a JavaScript version for use with Netscape Navigator v3.

It's now more than a thirty year tradition. And it's much more fun than the standard 'Hello World' program. But will Lloyd ever do a Java Applet, C# or PHP version? Who knows!

[ [previous][74] | [up][75] | [next][72] ]

[ [Top][76] ]

![The Scuba Doctor Dive Shop][77]

Last modified: Saturday, 24 May 2014

 | 

 |  ![][2] |  ![][2]  

![Petals Around the Rose][78]

   

| ----- |
| 

RECOMMENDED READING  
MICROSOFT 

![Speed of Thought][79]

**Business @ the  
Speed of Thought:  
Using a Digital  
Nervous System**  
[ Bill Gates ]  
Warner Books  
ISBN: 0446525685  
![amazon][80]

* * *

![The Road Ahead][81]

**The Road Ahead**  
[ Bill Gates ]  
Penguin  
ISBN: 0140260404  
![amazon][80]

* * *

![Hard Drive][82]

**Overdrive:  
Bill Gates and the Race to Control Cyberspace**  
[ James Wallace ]  
John Wiley & Sons  
ISBN: 0471180416  
![amazon][80]

* * *

![Hard Drive][83]

**Hard Drive:  
Bill Gates and the Making  
of the Microsoft Empire**  
[ Wallace & Erickson ]  
Harperbusiness  
ISBN: 0887306292  
![amazon][80]

* * *

![The Microsoft Way][84]

**The Microsoft Way:  
The Real Story of How the Company Outsmarts Its Competition**  
[ Stross ]  
Perseus  
ISBN: 020132797X  
![amazon][80]

 | 

  
   
 |  ![][2] |  ![][2]  

> [home][3]  
> [computing][3]  
> [petals around the rose][75]  
> [bill gates plays petals][27] <  
   

[COMPUTING][3]  
> [computing platforms][85]  
> [web design][32]  
> [petals around the rose][75]  
> [articles][86]  
> [simulation][36]  
> [games][87]  

  

> [petals around the rose][75]  
> [play petals][74]  
> [bill gates plays petals][27] <  
> [fraternity of petals][72]  
> [fraternity register][88]  
   

   
  
   
 | 

| -----   |  
|  

[home][3] | [about][4] | [weird mob][5] | [computing][3] | [interests][6] | [insight][7]    

Copyright © 1995-2018 Lloyd Borrett. All rights reserved.  **::**  [www.borrett.id.au][89]  
mob 0418 170 044  **::**  tel +61 3 5904 9005  **::**  email [lloyd@borrett.id.au][90]  **::**  skype lloyd_borrett  
twitter [@borrett][91]  **::**  facebook [lloyd.borrett][92]  **::**  linkedin [lloydborrett][93]

 | 

[1]: http://www.borrett.id.au/images/lrb-home.gif
[2]: http://www.borrett.id.au/images/template/spacer.gif
[3]: http://www.borrett.id.au/default.htm
[4]: http://www.borrett.id.au/about/default.htm
[5]: http://www.borrett.id.au/weirdmob/default.htm
[6]: http://www.borrett.id.au/interests/default.htm
[7]: http://www.borrett.id.au/insight/default.htm
[8]: http://www.milonic.com/
[9]: http://www.borrett.id.au/core/default.htm
[10]: http://www.borrett.id.au/insight/lrb-blog.htm
[11]: http://www.borrett.id.au/forums/index.php
[12]: http://www.borrett.id.au/images/icon_twitter.png "Follow Lloyd on Twitter"
[13]: http://www.borrett.id.au/images/icon_facebook.png "Friend Lloyd on Facebook"
[14]: http://www.borrett.id.au/images/icon_linkedin.png "Connect with Lloyd on LinkedIn"
[15]: http://www.borrett.id.au/images/icon_pinterest.png "Follow Lloyd on Pinterest"
[16]: http://www.borrett.id.au/images/backgrounds/computing-left.jpg
[17]: http://www.borrett.id.au/images/plus.gif
[18]: http://www.borrett.id.au/images/none.gif
[19]: http://www.borrett.id.au/about/melbourne.htm
[20]: http://www.borrett.id.au/about/find-way.htm
[21]: http://www.borrett.id.au/bhpdays.htm
[22]: http://www.borrett.id.au/interests/300km.htm
[23]: http://www.borrett.id.au/weirdmob/companions.htm
[24]: http://www.borrett.id.au/core/privacy.htm
[25]: http://www.borrett.id.au/about/people.htm
[26]: http://www.borrett.id.au/about/calling.htm
[27]: http://www.borrett.id.au/petals-bg.htm
[28]: http://www.borrett.id.au/interests/bikes.htm
[29]: http://www.borrett.id.au/about/atwork.htm
[30]: http://www.borrett.id.au/weirdmob/nativewildlife.htm
[31]: http://www.borrett.id.au/interests/sailing.htm
[32]: http://www.borrett.id.au/webdesign.htm
[33]: http://www.borrett.id.au/my-website.htm
[34]: http://www.borrett.id.au/protech-website.htm
[35]: http://www.borrett.id.au/avbug-website.htm
[36]: http://www.borrett.id.au/simulation.htm
[37]: http://www.borrett.id.au/web-awards.htm
[38]: http://www.borrett.id.au/interests/lps.htm
[39]: http://www.borrett.id.au/interests/dvds.htm
[40]: http://www.borrett.id.au/interests/cds.htm
[41]: http://www.borrett.id.au/interests/music.htm
[42]: http://www.borrett.id.au/images/computing/dice_4-b-2.gif
[43]: http://www.borrett.id.au/images/computing/dice_1-g-1.gif
[44]: http://www.borrett.id.au/images/computing/dice_6-r-2.gif
[45]: http://www.borrett.id.au/images/computing/dice_3-b-1.gif
[46]: http://www.borrett.id.au/images/computing/dice_6-g-2.gif
[47]: http://www.borrett.id.au/images/computing/dice_5-r-1.gif
[48]: http://www.borrett.id.au/images/computing/dice_5-b-1.gif
[49]: http://www.borrett.id.au/images/computing/dice_4-r-1.gif
[50]: http://www.borrett.id.au/images/computing/dice_3-g-2.gif
[51]: http://www.borrett.id.au/images/computing/dice_5-g-1.gif
[52]: http://www.borrett.id.au/images/computing/dice_6-b-2.gif
[53]: http://www.borrett.id.au/images/computing/dice_2-b-1.gif
[54]: http://www.borrett.id.au/images/computing/dice_2-b-2.gif
[55]: http://www.borrett.id.au/images/computing/dice_3-b-2.gif
[56]: http://www.borrett.id.au/images/computing/dice_6-r-1.gif
[57]: http://www.borrett.id.au/images/computing/dice_2-g-2.gif
[58]: http://www.borrett.id.au/images/computing/dice_4-g-1.gif
[59]: http://www.borrett.id.au/images/computing/dice_4-b-1.gif
[60]: http://www.borrett.id.au/images/computing/dice_1-r-1.gif
[61]: http://www.borrett.id.au/images/computing/dice_5-b-2.gif
[62]: http://www.borrett.id.au/images/computing/dice_2-r-2.gif
[63]: http://www.borrett.id.au/images/computing/dice_5-r-2.gif
[64]: http://www.borrett.id.au/images/computing/dice_1-r-2.gif
[65]: http://www.borrett.id.au/images/computing/dice_6-b-1.gif
[66]: http://www.borrett.id.au/images/computing/dice_1-g-2.gif
[67]: http://www.borrett.id.au/images/computing/dice_3-g-1.gif
[68]: http://www.borrett.id.au/images/computing/dice_2-r-1.gif
[69]: http://www.borrett.id.au/images/computing/dice_3-r-1.gif
[70]: http://www.borrett.id.au/images/computing/dice_5-g-2.gif
[71]: http://www.borrett.id.au/images/computing/dice_3-r-2.gif
[72]: http://www.borrett.id.au/petals-frat.htm
[73]: http://www.borrett.id.au/computing/bhpdays.htm
[74]: http://www.borrett.id.au/petals-j.htm
[75]: http://www.borrett.id.au/petals.htm
[76]: http://www.borrett.id.au#top
[77]: http://www.borrett.id.au/images/banner-ads/scuba_doctor_banner_shop.gif
[78]: http://www.borrett.id.au/images/computing/rose.gif
[79]: http://www.borrett.id.au/images/rightcolumns/0446525685.gif
[80]: http://www.borrett.id.au/images/amazon_btn.gif
[81]: http://www.borrett.id.au/images/rightcolumns/0140260404.gif
[82]: http://www.borrett.id.au/images/rightcolumns/0471180416.jpg
[83]: http://www.borrett.id.au/images/rightcolumns/0887306292.gif
[84]: http://www.borrett.id.au/images/rightcolumns/020132797X.gif
[85]: http://www.borrett.id.au/platform.htm
[86]: http://www.borrett.id.au/articles.htm
[87]: http://www.borrett.id.au/games.htm
[88]: http://www.borrett.id.au/guestbook/index.php
[89]: http://www.borrett.id.au/
[90]: mailto:lloyd%40borrett.id.au
[91]: https://twitter.com/#!/borrett/
[92]: https://www.facebook.com/lloyd.borrett
[93]: http://www.linkedin.com/in/lloydborrett

