Algorithm for finding sequence verifying a floor equation
We are looking for an algorithm solving the following problem.
Given a sequence $ 0 < x_1< dots < x_n $ find a sequence $0 < y_1 < dots < y_n$ such that $forall j in {2, dots, n-1}, i in {1, dots, j-1}, y in [y_j, y_{j+1}[ quad leftlfloor frac{y}{y_i} rightrfloor= leftlfloor frac{y_{j+1}}{y_i} rightrfloor ,$
while minimizing $sum_{i=1}^n a_i |y_i - x_i| $ with $a_1,dots,a_n in mathbb{R}^+$.
The distance may be replaced by another of the same spirit if it allows for a nice solution.
optimization algorithms floor-function
|
show 2 more comments
We are looking for an algorithm solving the following problem.
Given a sequence $ 0 < x_1< dots < x_n $ find a sequence $0 < y_1 < dots < y_n$ such that $forall j in {2, dots, n-1}, i in {1, dots, j-1}, y in [y_j, y_{j+1}[ quad leftlfloor frac{y}{y_i} rightrfloor= leftlfloor frac{y_{j+1}}{y_i} rightrfloor ,$
while minimizing $sum_{i=1}^n a_i |y_i - x_i| $ with $a_1,dots,a_n in mathbb{R}^+$.
The distance may be replaced by another of the same spirit if it allows for a nice solution.
optimization algorithms floor-function
2
What do you mean by "almost surely"? I don't see how the formal meaning would apply here.
– Todor Markov
Nov 22 '18 at 17:04
what is $n$, typically?
– LinAlg
Nov 25 '18 at 20:03
@LinAlg n is typically between 5 and 20
– Alfred M.
Nov 26 '18 at 9:18
@TodorMarkov: True, this was ambiguous. I changed the formulation.
– Alfred M.
Nov 26 '18 at 9:19
Thank for you significantly modifying the question four days after a comment. The new formulation does not make much sense to me since you do not need the index $j$ as you require $leftlfloor frac{y}{y_i} rightrfloor= leftlfloor frac{y_{i+1}}{y_i} rightrfloor$ for all $i$ and for all $y$ in $[y_1,y_i)$
– LinAlg
Nov 26 '18 at 13:48
|
show 2 more comments
We are looking for an algorithm solving the following problem.
Given a sequence $ 0 < x_1< dots < x_n $ find a sequence $0 < y_1 < dots < y_n$ such that $forall j in {2, dots, n-1}, i in {1, dots, j-1}, y in [y_j, y_{j+1}[ quad leftlfloor frac{y}{y_i} rightrfloor= leftlfloor frac{y_{j+1}}{y_i} rightrfloor ,$
while minimizing $sum_{i=1}^n a_i |y_i - x_i| $ with $a_1,dots,a_n in mathbb{R}^+$.
The distance may be replaced by another of the same spirit if it allows for a nice solution.
optimization algorithms floor-function
We are looking for an algorithm solving the following problem.
Given a sequence $ 0 < x_1< dots < x_n $ find a sequence $0 < y_1 < dots < y_n$ such that $forall j in {2, dots, n-1}, i in {1, dots, j-1}, y in [y_j, y_{j+1}[ quad leftlfloor frac{y}{y_i} rightrfloor= leftlfloor frac{y_{j+1}}{y_i} rightrfloor ,$
while minimizing $sum_{i=1}^n a_i |y_i - x_i| $ with $a_1,dots,a_n in mathbb{R}^+$.
The distance may be replaced by another of the same spirit if it allows for a nice solution.
optimization algorithms floor-function
optimization algorithms floor-function
edited Nov 27 '18 at 14:21
asked Nov 20 '18 at 10:58
Alfred M.
65
65
2
What do you mean by "almost surely"? I don't see how the formal meaning would apply here.
– Todor Markov
Nov 22 '18 at 17:04
what is $n$, typically?
– LinAlg
Nov 25 '18 at 20:03
@LinAlg n is typically between 5 and 20
– Alfred M.
Nov 26 '18 at 9:18
@TodorMarkov: True, this was ambiguous. I changed the formulation.
– Alfred M.
Nov 26 '18 at 9:19
Thank for you significantly modifying the question four days after a comment. The new formulation does not make much sense to me since you do not need the index $j$ as you require $leftlfloor frac{y}{y_i} rightrfloor= leftlfloor frac{y_{i+1}}{y_i} rightrfloor$ for all $i$ and for all $y$ in $[y_1,y_i)$
– LinAlg
Nov 26 '18 at 13:48
|
show 2 more comments
2
What do you mean by "almost surely"? I don't see how the formal meaning would apply here.
– Todor Markov
Nov 22 '18 at 17:04
what is $n$, typically?
– LinAlg
Nov 25 '18 at 20:03
@LinAlg n is typically between 5 and 20
– Alfred M.
Nov 26 '18 at 9:18
@TodorMarkov: True, this was ambiguous. I changed the formulation.
– Alfred M.
Nov 26 '18 at 9:19
Thank for you significantly modifying the question four days after a comment. The new formulation does not make much sense to me since you do not need the index $j$ as you require $leftlfloor frac{y}{y_i} rightrfloor= leftlfloor frac{y_{i+1}}{y_i} rightrfloor$ for all $i$ and for all $y$ in $[y_1,y_i)$
– LinAlg
Nov 26 '18 at 13:48
2
2
What do you mean by "almost surely"? I don't see how the formal meaning would apply here.
– Todor Markov
Nov 22 '18 at 17:04
What do you mean by "almost surely"? I don't see how the formal meaning would apply here.
– Todor Markov
Nov 22 '18 at 17:04
what is $n$, typically?
– LinAlg
Nov 25 '18 at 20:03
what is $n$, typically?
– LinAlg
Nov 25 '18 at 20:03
@LinAlg n is typically between 5 and 20
– Alfred M.
Nov 26 '18 at 9:18
@LinAlg n is typically between 5 and 20
– Alfred M.
Nov 26 '18 at 9:18
@TodorMarkov: True, this was ambiguous. I changed the formulation.
– Alfred M.
Nov 26 '18 at 9:19
@TodorMarkov: True, this was ambiguous. I changed the formulation.
– Alfred M.
Nov 26 '18 at 9:19
Thank for you significantly modifying the question four days after a comment. The new formulation does not make much sense to me since you do not need the index $j$ as you require $leftlfloor frac{y}{y_i} rightrfloor= leftlfloor frac{y_{i+1}}{y_i} rightrfloor$ for all $i$ and for all $y$ in $[y_1,y_i)$
– LinAlg
Nov 26 '18 at 13:48
Thank for you significantly modifying the question four days after a comment. The new formulation does not make much sense to me since you do not need the index $j$ as you require $leftlfloor frac{y}{y_i} rightrfloor= leftlfloor frac{y_{i+1}}{y_i} rightrfloor$ for all $i$ and for all $y$ in $[y_1,y_i)$
– LinAlg
Nov 26 '18 at 13:48
|
show 2 more comments
1 Answer
1
active
oldest
votes
Here is a solution, likely sub-optimal.
$ forall i in {1, dots, n-2}, ; text{let} ; f_i: x mapsto (leftlfloor {x}/{x_i} rightrfloor + 1) ; x_i$.
- Set $ y_1 := x_1 $ and $ y_2 := x_2 $.
$ forall k in {3, dots, n} $ set $ y_k := min left[ x_k, min_i f_i(x_k) right]. $
Another solution is to correct $ x_2 $:
- Set $ y_1 := x_1 $.
- Set $ y_2 := max (x_2, (leftlfloor x_3/x_1 rightrfloor) ; x_1 )$
$ forall k in {4, dots, n} $ set $ y_k := min left[ x_k, min_i f_i(x_k) right]. $
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%2f3006185%2falgorithm-for-finding-sequence-verifying-a-floor-equation%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
Here is a solution, likely sub-optimal.
$ forall i in {1, dots, n-2}, ; text{let} ; f_i: x mapsto (leftlfloor {x}/{x_i} rightrfloor + 1) ; x_i$.
- Set $ y_1 := x_1 $ and $ y_2 := x_2 $.
$ forall k in {3, dots, n} $ set $ y_k := min left[ x_k, min_i f_i(x_k) right]. $
Another solution is to correct $ x_2 $:
- Set $ y_1 := x_1 $.
- Set $ y_2 := max (x_2, (leftlfloor x_3/x_1 rightrfloor) ; x_1 )$
$ forall k in {4, dots, n} $ set $ y_k := min left[ x_k, min_i f_i(x_k) right]. $
add a comment |
Here is a solution, likely sub-optimal.
$ forall i in {1, dots, n-2}, ; text{let} ; f_i: x mapsto (leftlfloor {x}/{x_i} rightrfloor + 1) ; x_i$.
- Set $ y_1 := x_1 $ and $ y_2 := x_2 $.
$ forall k in {3, dots, n} $ set $ y_k := min left[ x_k, min_i f_i(x_k) right]. $
Another solution is to correct $ x_2 $:
- Set $ y_1 := x_1 $.
- Set $ y_2 := max (x_2, (leftlfloor x_3/x_1 rightrfloor) ; x_1 )$
$ forall k in {4, dots, n} $ set $ y_k := min left[ x_k, min_i f_i(x_k) right]. $
add a comment |
Here is a solution, likely sub-optimal.
$ forall i in {1, dots, n-2}, ; text{let} ; f_i: x mapsto (leftlfloor {x}/{x_i} rightrfloor + 1) ; x_i$.
- Set $ y_1 := x_1 $ and $ y_2 := x_2 $.
$ forall k in {3, dots, n} $ set $ y_k := min left[ x_k, min_i f_i(x_k) right]. $
Another solution is to correct $ x_2 $:
- Set $ y_1 := x_1 $.
- Set $ y_2 := max (x_2, (leftlfloor x_3/x_1 rightrfloor) ; x_1 )$
$ forall k in {4, dots, n} $ set $ y_k := min left[ x_k, min_i f_i(x_k) right]. $
Here is a solution, likely sub-optimal.
$ forall i in {1, dots, n-2}, ; text{let} ; f_i: x mapsto (leftlfloor {x}/{x_i} rightrfloor + 1) ; x_i$.
- Set $ y_1 := x_1 $ and $ y_2 := x_2 $.
$ forall k in {3, dots, n} $ set $ y_k := min left[ x_k, min_i f_i(x_k) right]. $
Another solution is to correct $ x_2 $:
- Set $ y_1 := x_1 $.
- Set $ y_2 := max (x_2, (leftlfloor x_3/x_1 rightrfloor) ; x_1 )$
$ forall k in {4, dots, n} $ set $ y_k := min left[ x_k, min_i f_i(x_k) right]. $
edited Nov 22 '18 at 14:18
answered Nov 20 '18 at 11:07
Alfred M.
65
65
add a comment |
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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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.
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%2f3006185%2falgorithm-for-finding-sequence-verifying-a-floor-equation%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
2
What do you mean by "almost surely"? I don't see how the formal meaning would apply here.
– Todor Markov
Nov 22 '18 at 17:04
what is $n$, typically?
– LinAlg
Nov 25 '18 at 20:03
@LinAlg n is typically between 5 and 20
– Alfred M.
Nov 26 '18 at 9:18
@TodorMarkov: True, this was ambiguous. I changed the formulation.
– Alfred M.
Nov 26 '18 at 9:19
Thank for you significantly modifying the question four days after a comment. The new formulation does not make much sense to me since you do not need the index $j$ as you require $leftlfloor frac{y}{y_i} rightrfloor= leftlfloor frac{y_{i+1}}{y_i} rightrfloor$ for all $i$ and for all $y$ in $[y_1,y_i)$
– LinAlg
Nov 26 '18 at 13:48