Filling a barrel, using small containers












0












$begingroup$


In how many ways, using containers, one with 2 liters and other with 7 liters, can you fill a barrel of 1234 liters?
What's the fastest and what's the slowest way to fill the barrel?



Should I use formula for permutation n!/(n−r)! or the other formula n!/r!-(n−r)! . In similar tasks I don't know which formula should be used.



Can anyone help? Thank you in advance!










share|cite|improve this question











$endgroup$








  • 1




    $begingroup$
    So you're filling some 2 litre barrels and then some 7 little barrels, and pouring them together to make 1234 litres. Does the order matter? If not, then you're essentially looking for the number of integer solutions to $$ 2a + 7b = 1234 $$
    $endgroup$
    – Matti P.
    Dec 4 '18 at 9:16










  • $begingroup$
    Order does not metter. Using that equation how can I find what's the fastest and what's the slowest way to fill the barrel?
    $endgroup$
    – Haus
    Dec 4 '18 at 9:19










  • $begingroup$
    Since your problem definition is not mentioning anything about time (for ex, how long it takes to fill a 2 / 7 litre barrel, or how long it takes to pour a barrel into the big barrel), it's a bit tricky to model the problem that way.
    $endgroup$
    – Matti P.
    Dec 4 '18 at 9:20






  • 1




    $begingroup$
    Some thoughts: Since $2a+7b = 1234$, we can take mod 7 on both sides, resulting in $$ 2a equiv 2 Rightarrow a equiv 1 ~text{mod} 7 $$ In addition, $a geq 0$ and $a leq frac{1234}{2} = 617$. Then, how many numbers that are $equiv 1~text{mod}~7$ between $0$ and $617$ ?
    $endgroup$
    – Matti P.
    Dec 4 '18 at 9:26












  • $begingroup$
    I thought solving this as Diophantine equation.
    $endgroup$
    – Haus
    Dec 4 '18 at 9:30
















0












$begingroup$


In how many ways, using containers, one with 2 liters and other with 7 liters, can you fill a barrel of 1234 liters?
What's the fastest and what's the slowest way to fill the barrel?



Should I use formula for permutation n!/(n−r)! or the other formula n!/r!-(n−r)! . In similar tasks I don't know which formula should be used.



Can anyone help? Thank you in advance!










share|cite|improve this question











$endgroup$








  • 1




    $begingroup$
    So you're filling some 2 litre barrels and then some 7 little barrels, and pouring them together to make 1234 litres. Does the order matter? If not, then you're essentially looking for the number of integer solutions to $$ 2a + 7b = 1234 $$
    $endgroup$
    – Matti P.
    Dec 4 '18 at 9:16










  • $begingroup$
    Order does not metter. Using that equation how can I find what's the fastest and what's the slowest way to fill the barrel?
    $endgroup$
    – Haus
    Dec 4 '18 at 9:19










  • $begingroup$
    Since your problem definition is not mentioning anything about time (for ex, how long it takes to fill a 2 / 7 litre barrel, or how long it takes to pour a barrel into the big barrel), it's a bit tricky to model the problem that way.
    $endgroup$
    – Matti P.
    Dec 4 '18 at 9:20






  • 1




    $begingroup$
    Some thoughts: Since $2a+7b = 1234$, we can take mod 7 on both sides, resulting in $$ 2a equiv 2 Rightarrow a equiv 1 ~text{mod} 7 $$ In addition, $a geq 0$ and $a leq frac{1234}{2} = 617$. Then, how many numbers that are $equiv 1~text{mod}~7$ between $0$ and $617$ ?
    $endgroup$
    – Matti P.
    Dec 4 '18 at 9:26












  • $begingroup$
    I thought solving this as Diophantine equation.
    $endgroup$
    – Haus
    Dec 4 '18 at 9:30














0












0








0





$begingroup$


In how many ways, using containers, one with 2 liters and other with 7 liters, can you fill a barrel of 1234 liters?
What's the fastest and what's the slowest way to fill the barrel?



Should I use formula for permutation n!/(n−r)! or the other formula n!/r!-(n−r)! . In similar tasks I don't know which formula should be used.



Can anyone help? Thank you in advance!










share|cite|improve this question











$endgroup$




In how many ways, using containers, one with 2 liters and other with 7 liters, can you fill a barrel of 1234 liters?
What's the fastest and what's the slowest way to fill the barrel?



Should I use formula for permutation n!/(n−r)! or the other formula n!/r!-(n−r)! . In similar tasks I don't know which formula should be used.



Can anyone help? Thank you in advance!







permutations combinations






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Dec 4 '18 at 22:34









Gerry Myerson

146k8147298




146k8147298










asked Dec 4 '18 at 9:11









HausHaus

307




307








  • 1




    $begingroup$
    So you're filling some 2 litre barrels and then some 7 little barrels, and pouring them together to make 1234 litres. Does the order matter? If not, then you're essentially looking for the number of integer solutions to $$ 2a + 7b = 1234 $$
    $endgroup$
    – Matti P.
    Dec 4 '18 at 9:16










  • $begingroup$
    Order does not metter. Using that equation how can I find what's the fastest and what's the slowest way to fill the barrel?
    $endgroup$
    – Haus
    Dec 4 '18 at 9:19










  • $begingroup$
    Since your problem definition is not mentioning anything about time (for ex, how long it takes to fill a 2 / 7 litre barrel, or how long it takes to pour a barrel into the big barrel), it's a bit tricky to model the problem that way.
    $endgroup$
    – Matti P.
    Dec 4 '18 at 9:20






  • 1




    $begingroup$
    Some thoughts: Since $2a+7b = 1234$, we can take mod 7 on both sides, resulting in $$ 2a equiv 2 Rightarrow a equiv 1 ~text{mod} 7 $$ In addition, $a geq 0$ and $a leq frac{1234}{2} = 617$. Then, how many numbers that are $equiv 1~text{mod}~7$ between $0$ and $617$ ?
    $endgroup$
    – Matti P.
    Dec 4 '18 at 9:26












  • $begingroup$
    I thought solving this as Diophantine equation.
    $endgroup$
    – Haus
    Dec 4 '18 at 9:30














  • 1




    $begingroup$
    So you're filling some 2 litre barrels and then some 7 little barrels, and pouring them together to make 1234 litres. Does the order matter? If not, then you're essentially looking for the number of integer solutions to $$ 2a + 7b = 1234 $$
    $endgroup$
    – Matti P.
    Dec 4 '18 at 9:16










  • $begingroup$
    Order does not metter. Using that equation how can I find what's the fastest and what's the slowest way to fill the barrel?
    $endgroup$
    – Haus
    Dec 4 '18 at 9:19










  • $begingroup$
    Since your problem definition is not mentioning anything about time (for ex, how long it takes to fill a 2 / 7 litre barrel, or how long it takes to pour a barrel into the big barrel), it's a bit tricky to model the problem that way.
    $endgroup$
    – Matti P.
    Dec 4 '18 at 9:20






  • 1




    $begingroup$
    Some thoughts: Since $2a+7b = 1234$, we can take mod 7 on both sides, resulting in $$ 2a equiv 2 Rightarrow a equiv 1 ~text{mod} 7 $$ In addition, $a geq 0$ and $a leq frac{1234}{2} = 617$. Then, how many numbers that are $equiv 1~text{mod}~7$ between $0$ and $617$ ?
    $endgroup$
    – Matti P.
    Dec 4 '18 at 9:26












  • $begingroup$
    I thought solving this as Diophantine equation.
    $endgroup$
    – Haus
    Dec 4 '18 at 9:30








1




1




$begingroup$
So you're filling some 2 litre barrels and then some 7 little barrels, and pouring them together to make 1234 litres. Does the order matter? If not, then you're essentially looking for the number of integer solutions to $$ 2a + 7b = 1234 $$
$endgroup$
– Matti P.
Dec 4 '18 at 9:16




$begingroup$
So you're filling some 2 litre barrels and then some 7 little barrels, and pouring them together to make 1234 litres. Does the order matter? If not, then you're essentially looking for the number of integer solutions to $$ 2a + 7b = 1234 $$
$endgroup$
– Matti P.
Dec 4 '18 at 9:16












$begingroup$
Order does not metter. Using that equation how can I find what's the fastest and what's the slowest way to fill the barrel?
$endgroup$
– Haus
Dec 4 '18 at 9:19




$begingroup$
Order does not metter. Using that equation how can I find what's the fastest and what's the slowest way to fill the barrel?
$endgroup$
– Haus
Dec 4 '18 at 9:19












$begingroup$
Since your problem definition is not mentioning anything about time (for ex, how long it takes to fill a 2 / 7 litre barrel, or how long it takes to pour a barrel into the big barrel), it's a bit tricky to model the problem that way.
$endgroup$
– Matti P.
Dec 4 '18 at 9:20




$begingroup$
Since your problem definition is not mentioning anything about time (for ex, how long it takes to fill a 2 / 7 litre barrel, or how long it takes to pour a barrel into the big barrel), it's a bit tricky to model the problem that way.
$endgroup$
– Matti P.
Dec 4 '18 at 9:20




1




1




$begingroup$
Some thoughts: Since $2a+7b = 1234$, we can take mod 7 on both sides, resulting in $$ 2a equiv 2 Rightarrow a equiv 1 ~text{mod} 7 $$ In addition, $a geq 0$ and $a leq frac{1234}{2} = 617$. Then, how many numbers that are $equiv 1~text{mod}~7$ between $0$ and $617$ ?
$endgroup$
– Matti P.
Dec 4 '18 at 9:26






$begingroup$
Some thoughts: Since $2a+7b = 1234$, we can take mod 7 on both sides, resulting in $$ 2a equiv 2 Rightarrow a equiv 1 ~text{mod} 7 $$ In addition, $a geq 0$ and $a leq frac{1234}{2} = 617$. Then, how many numbers that are $equiv 1~text{mod}~7$ between $0$ and $617$ ?
$endgroup$
– Matti P.
Dec 4 '18 at 9:26














$begingroup$
I thought solving this as Diophantine equation.
$endgroup$
– Haus
Dec 4 '18 at 9:30




$begingroup$
I thought solving this as Diophantine equation.
$endgroup$
– Haus
Dec 4 '18 at 9:30










1 Answer
1






active

oldest

votes


















2












$begingroup$

If the order of using the $2$ and $7$ liter barrels does not matter then you do not need combinations or permutations. You simply need to find the number of solutions to



$2a + 7b = 1234$



where $a$ and $b$ are non-negative integers (you can use $0$ barrels of either size, but you cannot use $-1$ barrels).



So the minimum value of $a$ is $0$. And the maximum value is $frac{1234}{2}=617$. So we have



$0 le a le 617$



In addition, to make $7b=1234 - 2a$ a multiple of $7$, we must have $a mod 7 = 1$.



So $a$ can be $1, 8, 15, 22, dots, 610, 617$. The corresponding values of $b$ are $176, 174, 172, 170, dots, 2, 0$.



From this you should be able to work out how many possible values there are for $a$ and $b$.






share|cite|improve this answer









$endgroup$













  • $begingroup$
    How many possible values for a and b, do i use the formula for binomial coefficient? Thank you.
    $endgroup$
    – Haus
    Dec 4 '18 at 9:44










  • $begingroup$
    You are over-complicating this. Look at the possible values for $b$. How many integers between $0$ and $176$ inclusive are multiples of $2$ ?
    $endgroup$
    – gandalf61
    Dec 4 '18 at 10:21











Your Answer





StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3025323%2ffilling-a-barrel-using-small-containers%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









2












$begingroup$

If the order of using the $2$ and $7$ liter barrels does not matter then you do not need combinations or permutations. You simply need to find the number of solutions to



$2a + 7b = 1234$



where $a$ and $b$ are non-negative integers (you can use $0$ barrels of either size, but you cannot use $-1$ barrels).



So the minimum value of $a$ is $0$. And the maximum value is $frac{1234}{2}=617$. So we have



$0 le a le 617$



In addition, to make $7b=1234 - 2a$ a multiple of $7$, we must have $a mod 7 = 1$.



So $a$ can be $1, 8, 15, 22, dots, 610, 617$. The corresponding values of $b$ are $176, 174, 172, 170, dots, 2, 0$.



From this you should be able to work out how many possible values there are for $a$ and $b$.






share|cite|improve this answer









$endgroup$













  • $begingroup$
    How many possible values for a and b, do i use the formula for binomial coefficient? Thank you.
    $endgroup$
    – Haus
    Dec 4 '18 at 9:44










  • $begingroup$
    You are over-complicating this. Look at the possible values for $b$. How many integers between $0$ and $176$ inclusive are multiples of $2$ ?
    $endgroup$
    – gandalf61
    Dec 4 '18 at 10:21
















2












$begingroup$

If the order of using the $2$ and $7$ liter barrels does not matter then you do not need combinations or permutations. You simply need to find the number of solutions to



$2a + 7b = 1234$



where $a$ and $b$ are non-negative integers (you can use $0$ barrels of either size, but you cannot use $-1$ barrels).



So the minimum value of $a$ is $0$. And the maximum value is $frac{1234}{2}=617$. So we have



$0 le a le 617$



In addition, to make $7b=1234 - 2a$ a multiple of $7$, we must have $a mod 7 = 1$.



So $a$ can be $1, 8, 15, 22, dots, 610, 617$. The corresponding values of $b$ are $176, 174, 172, 170, dots, 2, 0$.



From this you should be able to work out how many possible values there are for $a$ and $b$.






share|cite|improve this answer









$endgroup$













  • $begingroup$
    How many possible values for a and b, do i use the formula for binomial coefficient? Thank you.
    $endgroup$
    – Haus
    Dec 4 '18 at 9:44










  • $begingroup$
    You are over-complicating this. Look at the possible values for $b$. How many integers between $0$ and $176$ inclusive are multiples of $2$ ?
    $endgroup$
    – gandalf61
    Dec 4 '18 at 10:21














2












2








2





$begingroup$

If the order of using the $2$ and $7$ liter barrels does not matter then you do not need combinations or permutations. You simply need to find the number of solutions to



$2a + 7b = 1234$



where $a$ and $b$ are non-negative integers (you can use $0$ barrels of either size, but you cannot use $-1$ barrels).



So the minimum value of $a$ is $0$. And the maximum value is $frac{1234}{2}=617$. So we have



$0 le a le 617$



In addition, to make $7b=1234 - 2a$ a multiple of $7$, we must have $a mod 7 = 1$.



So $a$ can be $1, 8, 15, 22, dots, 610, 617$. The corresponding values of $b$ are $176, 174, 172, 170, dots, 2, 0$.



From this you should be able to work out how many possible values there are for $a$ and $b$.






share|cite|improve this answer









$endgroup$



If the order of using the $2$ and $7$ liter barrels does not matter then you do not need combinations or permutations. You simply need to find the number of solutions to



$2a + 7b = 1234$



where $a$ and $b$ are non-negative integers (you can use $0$ barrels of either size, but you cannot use $-1$ barrels).



So the minimum value of $a$ is $0$. And the maximum value is $frac{1234}{2}=617$. So we have



$0 le a le 617$



In addition, to make $7b=1234 - 2a$ a multiple of $7$, we must have $a mod 7 = 1$.



So $a$ can be $1, 8, 15, 22, dots, 610, 617$. The corresponding values of $b$ are $176, 174, 172, 170, dots, 2, 0$.



From this you should be able to work out how many possible values there are for $a$ and $b$.







share|cite|improve this answer












share|cite|improve this answer



share|cite|improve this answer










answered Dec 4 '18 at 9:39









gandalf61gandalf61

8,076625




8,076625












  • $begingroup$
    How many possible values for a and b, do i use the formula for binomial coefficient? Thank you.
    $endgroup$
    – Haus
    Dec 4 '18 at 9:44










  • $begingroup$
    You are over-complicating this. Look at the possible values for $b$. How many integers between $0$ and $176$ inclusive are multiples of $2$ ?
    $endgroup$
    – gandalf61
    Dec 4 '18 at 10:21


















  • $begingroup$
    How many possible values for a and b, do i use the formula for binomial coefficient? Thank you.
    $endgroup$
    – Haus
    Dec 4 '18 at 9:44










  • $begingroup$
    You are over-complicating this. Look at the possible values for $b$. How many integers between $0$ and $176$ inclusive are multiples of $2$ ?
    $endgroup$
    – gandalf61
    Dec 4 '18 at 10:21
















$begingroup$
How many possible values for a and b, do i use the formula for binomial coefficient? Thank you.
$endgroup$
– Haus
Dec 4 '18 at 9:44




$begingroup$
How many possible values for a and b, do i use the formula for binomial coefficient? Thank you.
$endgroup$
– Haus
Dec 4 '18 at 9:44












$begingroup$
You are over-complicating this. Look at the possible values for $b$. How many integers between $0$ and $176$ inclusive are multiples of $2$ ?
$endgroup$
– gandalf61
Dec 4 '18 at 10:21




$begingroup$
You are over-complicating this. Look at the possible values for $b$. How many integers between $0$ and $176$ inclusive are multiples of $2$ ?
$endgroup$
– gandalf61
Dec 4 '18 at 10:21


















draft saved

draft discarded




















































Thanks for contributing an answer to Mathematics Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


Use MathJax to format equations. MathJax reference.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3025323%2ffilling-a-barrel-using-small-containers%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Quarter-circle Tiles

build a pushdown automaton that recognizes the reverse language of a given pushdown automaton?

Mont Emei