20120419, 04:21  #1 
"Jason Goatcher"
Mar 2005
5·701 Posts 
Runescape math problem
Edit:I got a little longwinded writing this, so I put dashes around the actual problem.
This isn't technically a homework problem, and I can easily solve it in what I assume is the inefficient way. But I want to know the smart way to solve this particular problem. Recently in the game Runescape flasks were introduced. Flasks are like normal potions, except they are 6dose instead of 4dose. For reasons I'm not going to go into, only the 6dose ones and empty ones are notable, which means you're given a virtual certificate that can be exchanged for the actual items. Noting items makes it easier to do things like buying and selling items that don't normally stack. If a flask is only partially full, though, it takes up an entire inventory space and can't be noted, which can be annoying if you have a lot of partial flasks to deal with. If you player kill a lot, there can be a lot of wild clicking which can create an abundance of partially full potions and flasks. Recombining unnotable potions and flasks is a big timewaster that people would rather not have in the game since it doesn't earn money or xp. This problem has to do with using unnotable potions to fill flasks. Now that I think about it, it would probably be easiest to just have a bunch of noted empty flasks and get 27 of the unnotable potions at the same time and fill as many of the flasks as that allows, which means the simply math problem 27*4/6=18, so 18 flasks per inventory. But this problem involves a situation where you don't note the flasks. Stupid for someone ingame, but mathematically interesting.  There are 28 slots available in an inventory and nothing is noted. Each slot either contains an empty flask that can take 6doses of potion or a regular 4dose potion. How many empty flasks and 4dose potions should be in that 28 slot inventory to most efficiently make 6dose flasks? Note: I know it's not necessary for the math problem, but it's a single click to put empty vials, partially filled potions and full flasks back in the bank. Just in case people want to suggest further problems to consider.  
20120420, 11:28  #2 
"Brian"
Jul 2007
The Netherlands
2^{6}×3×17 Posts 
I'm not sure how many other readers are in my situation, but with the best will in the world I cannot make head or tail of what your puzzle means. This is a tad frustrating for me because I sense that you have posed an interesting problem.
Part of my difficulty is that I don't play Runescape (or in fact any online games of the like) and I don't understand some of the jargon. Specifically, I don't know what it means for a flask or potion to be "notable", nor what concrete effect "noting" has. Nor do I understand what you do to make a 6dose flask. If you, or anyone else who *does* understand it, can try to put the problem into more mathematical language, that would help. Or alternatively, putting down how you would solve the problem in what you call the inefficient way might equally help me understand what is going on. 
20120420, 11:35  #3 
Romulan Interpreter
Jun 2011
Thailand
2^{2}·7·317 Posts 

20120420, 12:10  #4  
"Forget I exist"
Jul 2009
Dumbassville
8,369 Posts 
Quote:
28 item inventory empty flasks ( 6 doses when full) 4 dose potions ( so 1.5 to every flask fills every one of them up) he's asking what is the most efficient way to have them fill up the inventory so that each empty flask gets filled by the 4 dose potions: 0= empty flask 1= 4 dose potion 01110 could work except 5 doesn't divide 28 so it may not be the most efficient ( leaves stuff blank, or with doses left outside flasks). of course this is just my interpretation. 

20120420, 13:15  #5  
Apr 2010
Over the rainbow
2·3·11·37 Posts 
Quote:
Now , there is a new Item , B( flask) that use the same space as A. Unlike A, however, it can be used 6 time instead of the 4 time normal potion last. C is an empty flask( occuping a space in the inventory) that can be filled with A to be transformed as B=> 3(full)A+2C=2B Full flask/empty flask can be flagged, to be reconized at sight. Quote:
Last fiddled with by firejuggler on 20120420 at 13:17 

20120420, 13:17  #6  
Oct 2011
7·97 Posts 
Quote:
The problem he poses is simply: assuming you cannot stack the empty flasks(non notable), you have 28 slots that either contain an empty flask(that can hold 6 doses) or a 4 dose flask. So, since the ratio of 4 dose flasks to empty 6 dose flasks is 3:2(34's=26's), with 28 available slots, the best setup is 15  4 dose to 10 empty with 3 slots left over. 

20120420, 13:19  #7 
Apr 2010
Over the rainbow
2·3·11·37 Posts 
my bad, i got confused by 'non notable'

20120420, 13:21  #8  
"Forget I exist"
Jul 2009
Dumbassville
8,369 Posts 
Quote:


20120420, 13:29  #9 
Oct 2011
7·97 Posts 
But the problem posed was "most efficiently". I don't consider it efficient to use those 3 slots like that. Especially since it is likely (though not specified) that there is a very large bank/storage space used where they have numerous of these that have built up and they are looking for an efficient way to combine them. If you did 17/11 like you pose, then you'd have 1/2 a 4 flask left over, so would have to pull out 16/11 while keeping the 1 for the next set of combinations. So you have to remember each round whether you are doing a 17/11 or 16/11/1.

20120420, 13:34  #10 
"Forget I exist"
Jul 2009
Dumbassville
8,369 Posts 
28 > 11 full 2 dose left over > 12 full
16 left > 5 more full leaving 10 if you fill the other one with a 4 potion; 10 left > 4 more full leaves 6 left 6 left > 2 plus one more empty to use the extra potion doses left over leaving 2 newly opened I believe. the 3 made left 3 + 2 leaves 5 = 2 full leaving 3 left. 3 left > 1 more full. technically there may be a way to squeeze one more ( leaving just one not filled with a full potion I believe, the numbers look to me to almost resemble some of the numbers in the periodic table) Last fiddled with by science_man_88 on 20120420 at 13:43 
20120421, 01:09  #11 
"Jason Goatcher"
Mar 2005
110110110001_{2} Posts 
After walking away from the problem, I came up with
4x=6y x+y=28 y is the empty flasks that need to be filled, and x is 4dose potions. Considering that the answers were given by people that don't play Runescape there was more than one "right" answer. The partials are unavoidable, so what I'd do is combine 4dose potions and flasks until I have nothing but partial vials or all the flasks are filled. Then the task is to combine the partial vials and possibly return to filling flasks later when more 4doses are available. Just to clarify, the 1 to 5dose flasks are always unnotable, while the 6dose flasks vary in the notability depending on whether or not they can be traded to other players. Because of the way Runescape code works you can't note something unless it can be traded to other players. I'm not sure how a programmer would express the following, but it's a "bug" in the game because it's an unintended addition to the game's mechanics. 
Thread Tools  
Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
math gcd problem need help  crack11  Homework Help  55  20200813 11:18 
math help pls!  DSC  Miscellaneous Math  2  20050911 04:53 
help with math  DSC  Homework Help  13  20050831 07:16 
Help with Math Problem  jinydu  Puzzles  4  20031213 06:00 
Need help with math problem re: searching for all primes.  daxm  Miscellaneous Math  5  20030720 19:32 