Build a wall with three types of bricks. What is the max length of wall less than 1000 cm you won't be able...
$begingroup$
You need to build a wall of length no longer than $1000$ cm. You can use bricks of three sizes: $23$ cm, $27$ cm or $36$ cm, and you are not allowed to cut bricks.
What is the maximum length which you won't be able to lay?
For example, you can lay a brick wall of length 469 cm, because $11cdot 23 + 6 cdot 36 = 469$.
I was able to find that the answer is 229 with a simple dynamic programming algorithm. That does solve the problem, but I'd love to know if there's a more "mathematical" way to approach it.
I tried playing with some modulo arithmetic on the equation $23a+27b+36c=n$, but that didn't get me too far.
Any kind of help would be appreciated.
natural-numbers tiling
$endgroup$
|
show 1 more comment
$begingroup$
You need to build a wall of length no longer than $1000$ cm. You can use bricks of three sizes: $23$ cm, $27$ cm or $36$ cm, and you are not allowed to cut bricks.
What is the maximum length which you won't be able to lay?
For example, you can lay a brick wall of length 469 cm, because $11cdot 23 + 6 cdot 36 = 469$.
I was able to find that the answer is 229 with a simple dynamic programming algorithm. That does solve the problem, but I'd love to know if there's a more "mathematical" way to approach it.
I tried playing with some modulo arithmetic on the equation $23a+27b+36c=n$, but that didn't get me too far.
Any kind of help would be appreciated.
natural-numbers tiling
$endgroup$
$begingroup$
Are you sure the answer is $229$ because, unless I am misunderstanding something, you can lay more bricks of any of those $3$ sizes, i.e., $23$, $27$ or $36$? In fact, this is also a hint, the answer should be less than the minimum of those $3$ sizes.
$endgroup$
– John Omielan
Dec 21 '18 at 4:40
$begingroup$
@JohnOmielan surely you can't lay 24cm, which is larger than the minimum of these three given brick lengths.
$endgroup$
– Dave
Dec 21 '18 at 4:49
$begingroup$
@JohnOmielan Well, English is my second language so if you misunderstood the question, the fault is probably mine. But the answer is indeed 229. Yes, you cannot lay bricks of length less than 23, but you cannot also lay 37 cm, for example (without cutting the bricks).
$endgroup$
– Bob the Builder
Dec 21 '18 at 4:50
$begingroup$
Thanks for the clarification. If I understand you correctly now, you are asking what is the largest integer less than or equal to $1000$ so that all integers greater than or equal to it up to $1000$ can be represented as a linear multiple of the $3$ values, with the answer being $1001$ less this value? Your wording implied something different to me.
$endgroup$
– John Omielan
Dec 21 '18 at 5:09
1
$begingroup$
@JohnOmielan Maybe it'd be best if I just state it mathematically. So this is what I what to find: $max left{0leq nleq 1000 mathrel{}middle|mathrel{} nexists a,b,cinmathbb{N} text{ s.t. } n= 23a+27b+36c right}$. I hope that helps.
$endgroup$
– Bob the Builder
Dec 21 '18 at 5:26
|
show 1 more comment
$begingroup$
You need to build a wall of length no longer than $1000$ cm. You can use bricks of three sizes: $23$ cm, $27$ cm or $36$ cm, and you are not allowed to cut bricks.
What is the maximum length which you won't be able to lay?
For example, you can lay a brick wall of length 469 cm, because $11cdot 23 + 6 cdot 36 = 469$.
I was able to find that the answer is 229 with a simple dynamic programming algorithm. That does solve the problem, but I'd love to know if there's a more "mathematical" way to approach it.
I tried playing with some modulo arithmetic on the equation $23a+27b+36c=n$, but that didn't get me too far.
Any kind of help would be appreciated.
natural-numbers tiling
$endgroup$
You need to build a wall of length no longer than $1000$ cm. You can use bricks of three sizes: $23$ cm, $27$ cm or $36$ cm, and you are not allowed to cut bricks.
What is the maximum length which you won't be able to lay?
For example, you can lay a brick wall of length 469 cm, because $11cdot 23 + 6 cdot 36 = 469$.
I was able to find that the answer is 229 with a simple dynamic programming algorithm. That does solve the problem, but I'd love to know if there's a more "mathematical" way to approach it.
I tried playing with some modulo arithmetic on the equation $23a+27b+36c=n$, but that didn't get me too far.
Any kind of help would be appreciated.
natural-numbers tiling
natural-numbers tiling
edited Dec 22 '18 at 2:05
Bob the Builder
asked Dec 21 '18 at 4:34
Bob the BuilderBob the Builder
534
534
$begingroup$
Are you sure the answer is $229$ because, unless I am misunderstanding something, you can lay more bricks of any of those $3$ sizes, i.e., $23$, $27$ or $36$? In fact, this is also a hint, the answer should be less than the minimum of those $3$ sizes.
$endgroup$
– John Omielan
Dec 21 '18 at 4:40
$begingroup$
@JohnOmielan surely you can't lay 24cm, which is larger than the minimum of these three given brick lengths.
$endgroup$
– Dave
Dec 21 '18 at 4:49
$begingroup$
@JohnOmielan Well, English is my second language so if you misunderstood the question, the fault is probably mine. But the answer is indeed 229. Yes, you cannot lay bricks of length less than 23, but you cannot also lay 37 cm, for example (without cutting the bricks).
$endgroup$
– Bob the Builder
Dec 21 '18 at 4:50
$begingroup$
Thanks for the clarification. If I understand you correctly now, you are asking what is the largest integer less than or equal to $1000$ so that all integers greater than or equal to it up to $1000$ can be represented as a linear multiple of the $3$ values, with the answer being $1001$ less this value? Your wording implied something different to me.
$endgroup$
– John Omielan
Dec 21 '18 at 5:09
1
$begingroup$
@JohnOmielan Maybe it'd be best if I just state it mathematically. So this is what I what to find: $max left{0leq nleq 1000 mathrel{}middle|mathrel{} nexists a,b,cinmathbb{N} text{ s.t. } n= 23a+27b+36c right}$. I hope that helps.
$endgroup$
– Bob the Builder
Dec 21 '18 at 5:26
|
show 1 more comment
$begingroup$
Are you sure the answer is $229$ because, unless I am misunderstanding something, you can lay more bricks of any of those $3$ sizes, i.e., $23$, $27$ or $36$? In fact, this is also a hint, the answer should be less than the minimum of those $3$ sizes.
$endgroup$
– John Omielan
Dec 21 '18 at 4:40
$begingroup$
@JohnOmielan surely you can't lay 24cm, which is larger than the minimum of these three given brick lengths.
$endgroup$
– Dave
Dec 21 '18 at 4:49
$begingroup$
@JohnOmielan Well, English is my second language so if you misunderstood the question, the fault is probably mine. But the answer is indeed 229. Yes, you cannot lay bricks of length less than 23, but you cannot also lay 37 cm, for example (without cutting the bricks).
$endgroup$
– Bob the Builder
Dec 21 '18 at 4:50
$begingroup$
Thanks for the clarification. If I understand you correctly now, you are asking what is the largest integer less than or equal to $1000$ so that all integers greater than or equal to it up to $1000$ can be represented as a linear multiple of the $3$ values, with the answer being $1001$ less this value? Your wording implied something different to me.
$endgroup$
– John Omielan
Dec 21 '18 at 5:09
1
$begingroup$
@JohnOmielan Maybe it'd be best if I just state it mathematically. So this is what I what to find: $max left{0leq nleq 1000 mathrel{}middle|mathrel{} nexists a,b,cinmathbb{N} text{ s.t. } n= 23a+27b+36c right}$. I hope that helps.
$endgroup$
– Bob the Builder
Dec 21 '18 at 5:26
$begingroup$
Are you sure the answer is $229$ because, unless I am misunderstanding something, you can lay more bricks of any of those $3$ sizes, i.e., $23$, $27$ or $36$? In fact, this is also a hint, the answer should be less than the minimum of those $3$ sizes.
$endgroup$
– John Omielan
Dec 21 '18 at 4:40
$begingroup$
Are you sure the answer is $229$ because, unless I am misunderstanding something, you can lay more bricks of any of those $3$ sizes, i.e., $23$, $27$ or $36$? In fact, this is also a hint, the answer should be less than the minimum of those $3$ sizes.
$endgroup$
– John Omielan
Dec 21 '18 at 4:40
$begingroup$
@JohnOmielan surely you can't lay 24cm, which is larger than the minimum of these three given brick lengths.
$endgroup$
– Dave
Dec 21 '18 at 4:49
$begingroup$
@JohnOmielan surely you can't lay 24cm, which is larger than the minimum of these three given brick lengths.
$endgroup$
– Dave
Dec 21 '18 at 4:49
$begingroup$
@JohnOmielan Well, English is my second language so if you misunderstood the question, the fault is probably mine. But the answer is indeed 229. Yes, you cannot lay bricks of length less than 23, but you cannot also lay 37 cm, for example (without cutting the bricks).
$endgroup$
– Bob the Builder
Dec 21 '18 at 4:50
$begingroup$
@JohnOmielan Well, English is my second language so if you misunderstood the question, the fault is probably mine. But the answer is indeed 229. Yes, you cannot lay bricks of length less than 23, but you cannot also lay 37 cm, for example (without cutting the bricks).
$endgroup$
– Bob the Builder
Dec 21 '18 at 4:50
$begingroup$
Thanks for the clarification. If I understand you correctly now, you are asking what is the largest integer less than or equal to $1000$ so that all integers greater than or equal to it up to $1000$ can be represented as a linear multiple of the $3$ values, with the answer being $1001$ less this value? Your wording implied something different to me.
$endgroup$
– John Omielan
Dec 21 '18 at 5:09
$begingroup$
Thanks for the clarification. If I understand you correctly now, you are asking what is the largest integer less than or equal to $1000$ so that all integers greater than or equal to it up to $1000$ can be represented as a linear multiple of the $3$ values, with the answer being $1001$ less this value? Your wording implied something different to me.
$endgroup$
– John Omielan
Dec 21 '18 at 5:09
1
1
$begingroup$
@JohnOmielan Maybe it'd be best if I just state it mathematically. So this is what I what to find: $max left{0leq nleq 1000 mathrel{}middle|mathrel{} nexists a,b,cinmathbb{N} text{ s.t. } n= 23a+27b+36c right}$. I hope that helps.
$endgroup$
– Bob the Builder
Dec 21 '18 at 5:26
$begingroup$
@JohnOmielan Maybe it'd be best if I just state it mathematically. So this is what I what to find: $max left{0leq nleq 1000 mathrel{}middle|mathrel{} nexists a,b,cinmathbb{N} text{ s.t. } n= 23a+27b+36c right}$. I hope that helps.
$endgroup$
– Bob the Builder
Dec 21 '18 at 5:26
|
show 1 more comment
1 Answer
1
active
oldest
votes
$begingroup$
Apart from having an upper limit of 1000, I believe this is basically what is known as the Frobenius, Postage Stamp or Chicken McNugget problem. According to https://brilliant.org/wiki/postage-stamp-problem-chicken-mcnugget-theorem/ :
The Frobenius problem (or Chicken McNugget problem) is, given coins worth $a_1, a_2, ldots, a_n$ units, to find the largest $N$ such that no combination of the coins is worth exactly $N$ units. This value $N = gleft( a_1, a_2, ldots, a_n right)$ is called the Frobenius number of the $a_i$.
The problem comes up in many real-world contexts, and despite being quite elementary, its general solution is not known. The solution is completely understood for $n = 2$, but even for $n = 3$, there is no general closed-form formula for the Frobenius number.
Thus, apart from the result being no larger than your maximum allowed, this shows that for even your example with $3$ variables, there is no general solution. I don't know of any way to handle restricting the result to within a specified maximum as well, with this likely making the problem even more difficult to solve, but perhaps somebody else can answer this or suggest something.
$endgroup$
$begingroup$
The book "The Diophantine Frobenius Problem" is a comprehensive resource that covers many algorithms: g.co/kgs/PwVRiu
$endgroup$
– Herman Tulleken
Dec 29 '18 at 21:23
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3048178%2fbuild-a-wall-with-three-types-of-bricks-what-is-the-max-length-of-wall-less-tha%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
$begingroup$
Apart from having an upper limit of 1000, I believe this is basically what is known as the Frobenius, Postage Stamp or Chicken McNugget problem. According to https://brilliant.org/wiki/postage-stamp-problem-chicken-mcnugget-theorem/ :
The Frobenius problem (or Chicken McNugget problem) is, given coins worth $a_1, a_2, ldots, a_n$ units, to find the largest $N$ such that no combination of the coins is worth exactly $N$ units. This value $N = gleft( a_1, a_2, ldots, a_n right)$ is called the Frobenius number of the $a_i$.
The problem comes up in many real-world contexts, and despite being quite elementary, its general solution is not known. The solution is completely understood for $n = 2$, but even for $n = 3$, there is no general closed-form formula for the Frobenius number.
Thus, apart from the result being no larger than your maximum allowed, this shows that for even your example with $3$ variables, there is no general solution. I don't know of any way to handle restricting the result to within a specified maximum as well, with this likely making the problem even more difficult to solve, but perhaps somebody else can answer this or suggest something.
$endgroup$
$begingroup$
The book "The Diophantine Frobenius Problem" is a comprehensive resource that covers many algorithms: g.co/kgs/PwVRiu
$endgroup$
– Herman Tulleken
Dec 29 '18 at 21:23
add a comment |
$begingroup$
Apart from having an upper limit of 1000, I believe this is basically what is known as the Frobenius, Postage Stamp or Chicken McNugget problem. According to https://brilliant.org/wiki/postage-stamp-problem-chicken-mcnugget-theorem/ :
The Frobenius problem (or Chicken McNugget problem) is, given coins worth $a_1, a_2, ldots, a_n$ units, to find the largest $N$ such that no combination of the coins is worth exactly $N$ units. This value $N = gleft( a_1, a_2, ldots, a_n right)$ is called the Frobenius number of the $a_i$.
The problem comes up in many real-world contexts, and despite being quite elementary, its general solution is not known. The solution is completely understood for $n = 2$, but even for $n = 3$, there is no general closed-form formula for the Frobenius number.
Thus, apart from the result being no larger than your maximum allowed, this shows that for even your example with $3$ variables, there is no general solution. I don't know of any way to handle restricting the result to within a specified maximum as well, with this likely making the problem even more difficult to solve, but perhaps somebody else can answer this or suggest something.
$endgroup$
$begingroup$
The book "The Diophantine Frobenius Problem" is a comprehensive resource that covers many algorithms: g.co/kgs/PwVRiu
$endgroup$
– Herman Tulleken
Dec 29 '18 at 21:23
add a comment |
$begingroup$
Apart from having an upper limit of 1000, I believe this is basically what is known as the Frobenius, Postage Stamp or Chicken McNugget problem. According to https://brilliant.org/wiki/postage-stamp-problem-chicken-mcnugget-theorem/ :
The Frobenius problem (or Chicken McNugget problem) is, given coins worth $a_1, a_2, ldots, a_n$ units, to find the largest $N$ such that no combination of the coins is worth exactly $N$ units. This value $N = gleft( a_1, a_2, ldots, a_n right)$ is called the Frobenius number of the $a_i$.
The problem comes up in many real-world contexts, and despite being quite elementary, its general solution is not known. The solution is completely understood for $n = 2$, but even for $n = 3$, there is no general closed-form formula for the Frobenius number.
Thus, apart from the result being no larger than your maximum allowed, this shows that for even your example with $3$ variables, there is no general solution. I don't know of any way to handle restricting the result to within a specified maximum as well, with this likely making the problem even more difficult to solve, but perhaps somebody else can answer this or suggest something.
$endgroup$
Apart from having an upper limit of 1000, I believe this is basically what is known as the Frobenius, Postage Stamp or Chicken McNugget problem. According to https://brilliant.org/wiki/postage-stamp-problem-chicken-mcnugget-theorem/ :
The Frobenius problem (or Chicken McNugget problem) is, given coins worth $a_1, a_2, ldots, a_n$ units, to find the largest $N$ such that no combination of the coins is worth exactly $N$ units. This value $N = gleft( a_1, a_2, ldots, a_n right)$ is called the Frobenius number of the $a_i$.
The problem comes up in many real-world contexts, and despite being quite elementary, its general solution is not known. The solution is completely understood for $n = 2$, but even for $n = 3$, there is no general closed-form formula for the Frobenius number.
Thus, apart from the result being no larger than your maximum allowed, this shows that for even your example with $3$ variables, there is no general solution. I don't know of any way to handle restricting the result to within a specified maximum as well, with this likely making the problem even more difficult to solve, but perhaps somebody else can answer this or suggest something.
edited Dec 26 '18 at 0:42
answered Dec 21 '18 at 6:48
John OmielanJohn Omielan
3,5251215
3,5251215
$begingroup$
The book "The Diophantine Frobenius Problem" is a comprehensive resource that covers many algorithms: g.co/kgs/PwVRiu
$endgroup$
– Herman Tulleken
Dec 29 '18 at 21:23
add a comment |
$begingroup$
The book "The Diophantine Frobenius Problem" is a comprehensive resource that covers many algorithms: g.co/kgs/PwVRiu
$endgroup$
– Herman Tulleken
Dec 29 '18 at 21:23
$begingroup$
The book "The Diophantine Frobenius Problem" is a comprehensive resource that covers many algorithms: g.co/kgs/PwVRiu
$endgroup$
– Herman Tulleken
Dec 29 '18 at 21:23
$begingroup$
The book "The Diophantine Frobenius Problem" is a comprehensive resource that covers many algorithms: g.co/kgs/PwVRiu
$endgroup$
– Herman Tulleken
Dec 29 '18 at 21:23
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3048178%2fbuild-a-wall-with-three-types-of-bricks-what-is-the-max-length-of-wall-less-tha%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
$begingroup$
Are you sure the answer is $229$ because, unless I am misunderstanding something, you can lay more bricks of any of those $3$ sizes, i.e., $23$, $27$ or $36$? In fact, this is also a hint, the answer should be less than the minimum of those $3$ sizes.
$endgroup$
– John Omielan
Dec 21 '18 at 4:40
$begingroup$
@JohnOmielan surely you can't lay 24cm, which is larger than the minimum of these three given brick lengths.
$endgroup$
– Dave
Dec 21 '18 at 4:49
$begingroup$
@JohnOmielan Well, English is my second language so if you misunderstood the question, the fault is probably mine. But the answer is indeed 229. Yes, you cannot lay bricks of length less than 23, but you cannot also lay 37 cm, for example (without cutting the bricks).
$endgroup$
– Bob the Builder
Dec 21 '18 at 4:50
$begingroup$
Thanks for the clarification. If I understand you correctly now, you are asking what is the largest integer less than or equal to $1000$ so that all integers greater than or equal to it up to $1000$ can be represented as a linear multiple of the $3$ values, with the answer being $1001$ less this value? Your wording implied something different to me.
$endgroup$
– John Omielan
Dec 21 '18 at 5:09
1
$begingroup$
@JohnOmielan Maybe it'd be best if I just state it mathematically. So this is what I what to find: $max left{0leq nleq 1000 mathrel{}middle|mathrel{} nexists a,b,cinmathbb{N} text{ s.t. } n= 23a+27b+36c right}$. I hope that helps.
$endgroup$
– Bob the Builder
Dec 21 '18 at 5:26