Jump to content
BrainDen.com - Brain Teasers
  • 0

Sorting out the bar bill


bonanova
 Share

Question

A bunch of friends went to the sports bar and got a group rate on the drinks: $5/glass for wine, $2/glass for beer, and $1/glass for water. When we left, the waiter asked me to sort out the bill. There was enough uncertainty in what people remembered that I could not be precise. So we happily just threw in enough to cover the bill, which came to $293 and we went home.

But it got me thinking. None of us had multiple glasses of the same beverage. The waiter said 106 glasses were used, once each. 18 of us did not drink water. 39 people had wine. I was certain that 9 of us were teetotalers. If I had known the sizes of just three classes of drinkers I could have figured out the bill, as it was, I could not.

But it did occur to me that if those who drank beer and water but not wine were as many as possible, and if those who drank only wine were half as many as that, I could say the smallest number of us who drank all three. Can you?

Link to comment
Share on other sites

10 answers to this question

Recommended Posts

  • 0
Spoiler

Alright, this time, I'm getting the smallest number of you who drank all three is 10 (the largest is 13).

Basically it still turns out that there are 0 people that didn't drink anything, so that didn't impact my original answer...but by maximizing the number of people that drank beer and water, I found a different answer for people that drank all three. Here's a breakdown of all 8 groups for reference:

  • NOTHING: 0
  • WINE ONLY: 3
  • BEER ONLY: 0
  • WATER ONLY: 9
  • WINE/BEER: 15
  • WINE/WATER: 11
  • BEER/WATER: 6
  • ALL: 10

Most of my above approach still worked, except there was a "+ N" (non-drinkers) added to a couple of my equations, which led to a few additional checks by trial and error, but it wasn't too bad.

Hopefully that matches your answer...or I should maybe just stick to my day job...

 

Link to comment
Share on other sites

  • 0

Approach

Spoiler

Let's start by identifying the 7 different groups of people involved and label them

  • Total people that had only Wine = W
  • Total people that had only Beer = B
  • Total people that had only Water = H
  • Total people that had Wine and Beer = WB
  • Total people that had Wine and Water = WH
  • Total people that had Beer and Water = BH
  • Total people that had Wine, Beer, and Water = WBH

Now, given that, we can write our system of equations based on the problem statement:

EQUATION 1 (total cost of all drinks):
5*(WINE) + 2*(BEER) + 1*(WATER) = 293
5*(W+WB+WH+WBH) + 2*(B+WB+BH+WBH) + (H+WH+BH+WBH) = 293
Simplifies to:
5W + 7WB + 6WH + 8WBH + 2B + 3BH + H = 293

EQUATION 2 (total glasses used):
W + B + H + 2WB + 2WH + 2BH + 3WBH = 106

EQUATION 3 (total non-water drinkers):
W + B + WB = 18

EQUATION 4 (total wine drinkers):
W + WB + WH + WBH = 39

EQUATION 5 (total non-alcohol drinkers):
H = 9

EQUATION 6 (ending assumption that wine-only was half the number of beer/water drinkers):
BH = 2W

 

 

So, now that we have our 6 equations, we can start doing our algebra:

Plug equation 5 into equation 1 and 2 to simplify slightly:
1) 5W + 7WB + 6WH + 8WBH + 2B + 3BH = 284
2)  W + 2WB + 2WH + 3WBH +  B + 2BH =  97

Plug equation 6 into equations 1 and 2:
1) 11W + 2B + 7WB + 6WH + 8WBH = 284
2)  5W +  B + 2WB + 2WH + 3WBH =  97

Re-order equation 1 and 2:
1) 2(W+B) + 9W + 7WB + 6WH + 8WBH = 284
2)  (W+B) + 4W + 2WB + 2WH + 3WBH =  97

Plug equation 3 (W+B = 18-WB) into equations 1 and 2:
1) 9W + 5WB + 6WH + 8WBH = 248
2) 4W +  WB + 2WH + 3WBH =  79

Plug equation 4 (W=39-WB-WH-WBH) into equation 1 and 2:
1) 4WB + 3WH + WBH = 103
2) 3WB + 2WH + WBH =  77

Solve for one of the remaining variables (WB):
WB = (103 - 3WH - WBH) / 4

Plug into equation 2:
WH = 1 + WBH

Alright, so we now have 1 equation with 2 unknowns, where one of the unknowns is what we're trying to determine! So, we can list out all of the possible values of WBH and WH...which happen to be:

WBH = 1, WH = 2
WBH = 2, WH = 3
...
WBH = 18, WH = 19

Anything above WBH = 18 will cause equation 4 to not work...so we can stop there with those 18 possibilities. Now it's just a matter of substituting in each of those values into our equations to find the lowest one that works. I'll spare the gory details, but WBH < 11 results in negative values for other variables at some point...so let's just show trying WBH = 11:

WBH = 11, WH = 12:

Substitute those values into our 4 equations and simplify:

  1.     5W + 2B + 7WB + 3BH = 124
  2.      W +  B + 2WB + 2BH = 40
  3.      W +  B +  WB       = 18
  4.      W +       WB +     = 16

Now substitute 4 into 3 to solve for B:

B = 2...so we know B = 2 and W = 16-WB

Plug those two into equations 1 and 2 and simplify

  1.     2WB + 3BH = 40
  2.      WB + 2BH = 22

Solve (WB = 22-2BH)
You find BH = 4...so given BH = 4, WBH = 11, WH = 12, B = 2, and H = 9, we can find the other two values of WB = 14 and W = 2...at which point we can verify all of the original equations hold true. so therefore, WBH (total number of people who drank all three drinks) is at least 11 given the assumptions we stated.

Link to comment
Share on other sites

  • 0
2 hours ago, rocdocmac said:

Does it necessarily mean that all 9 of the teetotalers drank water or is that an assumption? What if some didn't drink at all that day and therefore never touched one of the 106 glasses?

 

  1. It means that all of the teetotalers drank neither wine nor beer. Let's say also that the others did consume alcohol.
  2. One class of friends may have drunk nothing, and perforce not used a glass.
Link to comment
Share on other sites

  • 0
17 hours ago, Pickett said:

Approach

  Hide contents

Let's start by identifying the 7 different groups of people involved and label them

  • Total people that had only Wine = W
  • Total people that had only Beer = B
  • Total people that had only Water = H
  • Total people that had Wine and Beer = WB
  • Total people that had Wine and Water = WH
  • Total people that had Beer and Water = BH
  • Total people that had Wine, Beer, and Water = WBH

Now, given that, we can write our system of equations based on the problem statement:

EQUATION 1 (total cost of all drinks):
5*(WINE) + 2*(BEER) + 1*(WATER) = 293
5*(W+WB+WH+WBH) + 2*(B+WB+BH+WBH) + (H+WH+BH+WBH) = 293
Simplifies to:
5W + 7WB + 6WH + 8WBH + 2B + 3BH + H = 293

EQUATION 2 (total glasses used):
W + B + H + 2WB + 2WH + 2BH + 3WBH = 106

EQUATION 3 (total non-water drinkers):
W + B + WB = 18

EQUATION 4 (total wine drinkers):
W + WB + WH + WBH = 39

EQUATION 5 (total non-alcohol drinkers):
H = 9

EQUATION 6 (ending assumption that wine-only was half the number of beer/water drinkers):
BH = 2W

 

 

So, now that we have our 6 equations, we can start doing our algebra:

Plug equation 5 into equation 1 and 2 to simplify slightly:
1) 5W + 7WB + 6WH + 8WBH + 2B + 3BH = 284
2)  W + 2WB + 2WH + 3WBH +  B + 2BH =  97

Plug equation 6 into equations 1 and 2:
1) 11W + 2B + 7WB + 6WH + 8WBH = 284
2)  5W +  B + 2WB + 2WH + 3WBH =  97

Re-order equation 1 and 2:
1) 2(W+B) + 9W + 7WB + 6WH + 8WBH = 284
2)  (W+B) + 4W + 2WB + 2WH + 3WBH =  97

Plug equation 3 (W+B = 18-WB) into equations 1 and 2:
1) 9W + 5WB + 6WH + 8WBH = 248
2) 4W +  WB + 2WH + 3WBH =  79

Plug equation 4 (W=39-WB-WH-WBH) into equation 1 and 2:
1) 4WB + 3WH + WBH = 103
2) 3WB + 2WH + WBH =  77

Solve for one of the remaining variables (WB):
WB = (103 - 3WH - WBH) / 4

Plug into equation 2:
WH = 1 + WBH

Alright, so we now have 1 equation with 2 unknowns, where one of the unknowns is what we're trying to determine! So, we can list out all of the possible values of WBH and WH...which happen to be:

WBH = 1, WH = 2
WBH = 2, WH = 3
...
WBH = 18, WH = 19

Anything above WBH = 18 will cause equation 4 to not work...so we can stop there with those 18 possibilities. Now it's just a matter of substituting in each of those values into our equations to find the lowest one that works. I'll spare the gory details, but WBH < 11 results in negative values for other variables at some point...so let's just show trying WBH = 11:

WBH = 11, WH = 12:

Substitute those values into our 4 equations and simplify:

  1.     5W + 2B + 7WB + 3BH = 124
  2.      W +  B + 2WB + 2BH = 40
  3.      W +  B +  WB       = 18
  4.      W +       WB +     = 16

Now substitute 4 into 3 to solve for B:

B = 2...so we know B = 2 and W = 16-WB

Plug those two into equations 1 and 2 and simplify

  1.     2WB + 3BH = 40
  2.      WB + 2BH = 22

Solve (WB = 22-2BH)
You find BH = 4...so given BH = 4, WBH = 11, WH = 12, B = 2, and H = 9, we can find the other two values of WB = 14 and W = 2...at which point we can verify all of the original equations hold true. so therefore, WBH (total number of people who drank all three drinks) is at least 11 given the assumptions we stated.

@Pickett It may not impact your solution, but the OP did not intend to say that all of us drank something.

"Class of drinkers" was not meant to preclude anyone from drinking nothing.
Meaning there are eight "classes" of drinkers.

Sorry for that. I have this thing about insisting that zero is a number^_^ rather than a denial.

Also, I get a different answer. I'll check my analysis against yours to see why.

Link to comment
Share on other sites

  • 0
1 hour ago, bonanova said:

@Pickett It may not impact your solution, but the OP did not intend to say that all of us drank something.

"Class of drinkers" was not meant to preclude anyone from drinking nothing.
Meaning there are eight "classes" of drinkers.

Sorry for that. I have this thing about insisting that zero is a number^_^ rather than a denial.

Also, I get a different answer. I'll check my analysis against yours to see why.

I'm guessing it's because I missed this piece of the assumption: "who drank beer and water but not wine were as many as possible".

I'll give it another go with the non-drinkers included and that piece and see what I come up with.

Link to comment
Share on other sites

  • 0

I believe the answer is actually 

Spoiler

6.

Spoiler

First off, it's fairly easy to figure out how many of each drink we have. 
Wine(W) drinkers = 39, $5 per glass = $195 spent on wine, leaving $98 spent on water(H) and  beer(B)

106 glasses total - 39 wine glasses = 67 beer and water glasses

$2(B) + $1(H) = 98

B + H = 67

Subtract one equation from the other and B = 31, meaning H = 36. And W = 39 still. 

So, I decided to solve this by getting some drinks! Clear water, red wine, and green beer (must have been St Patrick's Day, I guess!)

drinks.jpg.38588957c59c6acfad79041307d793e3.jpg

And then I laid out all of the people I could account for for sure, one square per person, following the following:

9 squares marked with blue beads to represent "teetotalers" and that no red or green beads could be added. I could only remove a blue bead if I filled it's square with a water. Blue beads are allowed to remain to represent a person who drank nothing.

18 squares marked with yellow beads represent "those who drank no water" and that no white could be added. These must be filled by drinkers without white beads, and no drinkers without a white bead may exist outside of these 18 squares in the end. 

Then since those who drank water and beer should be as high a number as possible, but be exactly 2x those who drank only wine, I paired off as many sets as I could. I know that I can have less of these sets in my final solution, but not more, as I have run out of beer.

I also had a pile beside the image below that contained one beer, 6 waters and 24 wines.

 people.jpg.87df82877306dd0ae93b389a08f7e93c.jpg

Next, I moved each instance of lone wines to replace as many yellow beads as I could, as they fill that requirement.

I was also able to create 1 beer+wine drinker (who took a yellow space) and 6 water+wine drinkers.

I then removed one set of BH+BH+W beads at a time, and redistributed them as efficiently as possible in accordance with the rules, until I arrived at the following:

everyone.jpg.5d1d58290e8ca1fef50cb8c6382ecabe.jpg

1 water

8 nothing

7 wine

11 wine+beer

14 beer+water

15 water+wine

6 all

 

@ThunderCloud did all the work up until I pulled out the glass beads. 

Link to comment
Share on other sites

  • 0

@Cygnet I think something is wrong with your solution, as one of the requirements is that "18 of us did not drink water."

by your answer, you have 8 that drank nothing, 7 that drank only wine, and 11 that drank beer and wine...which totals 26 people that did not drink water.

Link to comment
Share on other sites

  • 0
15 hours ago, Pickett said:

@Cygnet I think something is wrong with your solution, as one of the requirements is that "18 of us did not drink water."

by your answer, you have 8 that drank nothing, 7 that drank only wine, and 11 that drank beer and wine...which totals 26 people that did not drink water.

Oh, oops!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...