How to derive the formula to compute an integer window number for given window width and overlap fraction (example given)
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I have a task of computing the window number for some time-dependent signals with overlapping. I have broken down the task to a purely mathematical (arithmetic/algebra) problem and provide an illustrative example here to aid thinking.
We are given a fixed window length $l_textw$ in seconds, and an overlap fraction $x$. The windows span t_start
to t_finish
(t_start is inclusive and t_finish is exclusive), i.e. the interval is $[t_textstart, t_textfinish)$. The question is, given a time $t_k$, what is the general mathematical formula that computes the earliest window $N_k in mathbbN$ that includes $t_k$? The formula takes two parameters $l_textw$ and $x$.
If that was too abstract, here is a simple example. Consider $l_textw = 0.4 s$. That is the first window $N_1$ spans $[0,0.4)$. The overlap factor is given to be $x=0.4$ which implies an overlap duration of $xcdot l_textw = 0.16 s$.
This means that the next window $N_2$ spans $[0.16,0.56)$ and so on ad infinitum.
The table below can then be visualised (and has no ending point). Now, given any time-point $t_k$, what is the most general formula that predicts the window $N_k$ in which it belongs? eg. if $t_k = 1.40$, the formula should predict $N_k$ = 7. if $t_k = 0.96$ it should predict $N_k=5$ and so on.
| t_start | t_finish | N(window no) |
|:-----------|------------:|:------------:|
| 0 | 0.40 | 1 |
| 0.16 | 0.56 | 2 |
| 0.40 | 0.80 | 3 |
| 0.56 | 0.96 | 4 |
| 0.80 | 1.20 | 5 |
| 0.96 | 1.36 | 6 |
| 1.20 | 1.60 | 7 |
| 1.36 | 1.76 | 8 |
| 1.60 | 2.00 | 9 |
| 1.76 | 2.16 | 10 |
| 2.00 | 2.40 | 11 |
algebra-precalculus induction arithmetic closed-form integers
add a comment |Â
up vote
0
down vote
favorite
I have a task of computing the window number for some time-dependent signals with overlapping. I have broken down the task to a purely mathematical (arithmetic/algebra) problem and provide an illustrative example here to aid thinking.
We are given a fixed window length $l_textw$ in seconds, and an overlap fraction $x$. The windows span t_start
to t_finish
(t_start is inclusive and t_finish is exclusive), i.e. the interval is $[t_textstart, t_textfinish)$. The question is, given a time $t_k$, what is the general mathematical formula that computes the earliest window $N_k in mathbbN$ that includes $t_k$? The formula takes two parameters $l_textw$ and $x$.
If that was too abstract, here is a simple example. Consider $l_textw = 0.4 s$. That is the first window $N_1$ spans $[0,0.4)$. The overlap factor is given to be $x=0.4$ which implies an overlap duration of $xcdot l_textw = 0.16 s$.
This means that the next window $N_2$ spans $[0.16,0.56)$ and so on ad infinitum.
The table below can then be visualised (and has no ending point). Now, given any time-point $t_k$, what is the most general formula that predicts the window $N_k$ in which it belongs? eg. if $t_k = 1.40$, the formula should predict $N_k$ = 7. if $t_k = 0.96$ it should predict $N_k=5$ and so on.
| t_start | t_finish | N(window no) |
|:-----------|------------:|:------------:|
| 0 | 0.40 | 1 |
| 0.16 | 0.56 | 2 |
| 0.40 | 0.80 | 3 |
| 0.56 | 0.96 | 4 |
| 0.80 | 1.20 | 5 |
| 0.96 | 1.36 | 6 |
| 1.20 | 1.60 | 7 |
| 1.36 | 1.76 | 8 |
| 1.60 | 2.00 | 9 |
| 1.76 | 2.16 | 10 |
| 2.00 | 2.40 | 11 |
algebra-precalculus induction arithmetic closed-form integers
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have a task of computing the window number for some time-dependent signals with overlapping. I have broken down the task to a purely mathematical (arithmetic/algebra) problem and provide an illustrative example here to aid thinking.
We are given a fixed window length $l_textw$ in seconds, and an overlap fraction $x$. The windows span t_start
to t_finish
(t_start is inclusive and t_finish is exclusive), i.e. the interval is $[t_textstart, t_textfinish)$. The question is, given a time $t_k$, what is the general mathematical formula that computes the earliest window $N_k in mathbbN$ that includes $t_k$? The formula takes two parameters $l_textw$ and $x$.
If that was too abstract, here is a simple example. Consider $l_textw = 0.4 s$. That is the first window $N_1$ spans $[0,0.4)$. The overlap factor is given to be $x=0.4$ which implies an overlap duration of $xcdot l_textw = 0.16 s$.
This means that the next window $N_2$ spans $[0.16,0.56)$ and so on ad infinitum.
The table below can then be visualised (and has no ending point). Now, given any time-point $t_k$, what is the most general formula that predicts the window $N_k$ in which it belongs? eg. if $t_k = 1.40$, the formula should predict $N_k$ = 7. if $t_k = 0.96$ it should predict $N_k=5$ and so on.
| t_start | t_finish | N(window no) |
|:-----------|------------:|:------------:|
| 0 | 0.40 | 1 |
| 0.16 | 0.56 | 2 |
| 0.40 | 0.80 | 3 |
| 0.56 | 0.96 | 4 |
| 0.80 | 1.20 | 5 |
| 0.96 | 1.36 | 6 |
| 1.20 | 1.60 | 7 |
| 1.36 | 1.76 | 8 |
| 1.60 | 2.00 | 9 |
| 1.76 | 2.16 | 10 |
| 2.00 | 2.40 | 11 |
algebra-precalculus induction arithmetic closed-form integers
I have a task of computing the window number for some time-dependent signals with overlapping. I have broken down the task to a purely mathematical (arithmetic/algebra) problem and provide an illustrative example here to aid thinking.
We are given a fixed window length $l_textw$ in seconds, and an overlap fraction $x$. The windows span t_start
to t_finish
(t_start is inclusive and t_finish is exclusive), i.e. the interval is $[t_textstart, t_textfinish)$. The question is, given a time $t_k$, what is the general mathematical formula that computes the earliest window $N_k in mathbbN$ that includes $t_k$? The formula takes two parameters $l_textw$ and $x$.
If that was too abstract, here is a simple example. Consider $l_textw = 0.4 s$. That is the first window $N_1$ spans $[0,0.4)$. The overlap factor is given to be $x=0.4$ which implies an overlap duration of $xcdot l_textw = 0.16 s$.
This means that the next window $N_2$ spans $[0.16,0.56)$ and so on ad infinitum.
The table below can then be visualised (and has no ending point). Now, given any time-point $t_k$, what is the most general formula that predicts the window $N_k$ in which it belongs? eg. if $t_k = 1.40$, the formula should predict $N_k$ = 7. if $t_k = 0.96$ it should predict $N_k=5$ and so on.
| t_start | t_finish | N(window no) |
|:-----------|------------:|:------------:|
| 0 | 0.40 | 1 |
| 0.16 | 0.56 | 2 |
| 0.40 | 0.80 | 3 |
| 0.56 | 0.96 | 4 |
| 0.80 | 1.20 | 5 |
| 0.96 | 1.36 | 6 |
| 1.20 | 1.60 | 7 |
| 1.36 | 1.76 | 8 |
| 1.60 | 2.00 | 9 |
| 1.76 | 2.16 | 10 |
| 2.00 | 2.40 | 11 |
algebra-precalculus induction arithmetic closed-form integers
asked Jul 18 at 21:54
Krishna
1438
1438
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
Start by considering only the odd numbered windows. Every time is in one of these and time $t$ is in window $n=2lfloor frac t0.4 rfloor+1$. Now compute how far you are into the window as $Delta t=t-0.4n$. If $Delta t lt 0.16$ you are in the previous window as well, so subtract $1$.
For the general case, $n=2lfloor frac tl_w rfloor+1, Delta t=t-l_wn$. If $Delta t lt xl_w$ you are in the previous window as well, so subtract $1$.
That formula is not general. In particular, it works only for this table. If you change $t_textw$ or $x$, it won't work. I am looking for a general formula. The table was just an example of one case
– Krishna
Jul 18 at 22:09
You can change $0.4$ to $l_w$ and $0.16$ to $xl_w$ and it works fine. It does depend on the structure of the overlap that you have defined, that every other window starts at a multiple of $l_w$. I have put that in
– Ross Millikan
Jul 18 at 22:49
My point is that I already tried your formula before posting here. For a completely different case, say $l_w = 0.72$ and $x=0.35$, will it work? I think my table is not generic enough. I shall change it tomorrow.
– Krishna
Jul 18 at 22:56
I believe it will. Do you have an example that says otherwise? Maybe I have not understood correctly how the overlap works. Would the start times then be $0,0.252,0.72,0.972,1.44,1.692,2.16$?
– Ross Millikan
Jul 18 at 22:59
I think my post was wrong. Sorry for wasting your time. I shall revise it soon
– Krishna
Jul 18 at 23:03
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
Start by considering only the odd numbered windows. Every time is in one of these and time $t$ is in window $n=2lfloor frac t0.4 rfloor+1$. Now compute how far you are into the window as $Delta t=t-0.4n$. If $Delta t lt 0.16$ you are in the previous window as well, so subtract $1$.
For the general case, $n=2lfloor frac tl_w rfloor+1, Delta t=t-l_wn$. If $Delta t lt xl_w$ you are in the previous window as well, so subtract $1$.
That formula is not general. In particular, it works only for this table. If you change $t_textw$ or $x$, it won't work. I am looking for a general formula. The table was just an example of one case
– Krishna
Jul 18 at 22:09
You can change $0.4$ to $l_w$ and $0.16$ to $xl_w$ and it works fine. It does depend on the structure of the overlap that you have defined, that every other window starts at a multiple of $l_w$. I have put that in
– Ross Millikan
Jul 18 at 22:49
My point is that I already tried your formula before posting here. For a completely different case, say $l_w = 0.72$ and $x=0.35$, will it work? I think my table is not generic enough. I shall change it tomorrow.
– Krishna
Jul 18 at 22:56
I believe it will. Do you have an example that says otherwise? Maybe I have not understood correctly how the overlap works. Would the start times then be $0,0.252,0.72,0.972,1.44,1.692,2.16$?
– Ross Millikan
Jul 18 at 22:59
I think my post was wrong. Sorry for wasting your time. I shall revise it soon
– Krishna
Jul 18 at 23:03
add a comment |Â
up vote
0
down vote
Start by considering only the odd numbered windows. Every time is in one of these and time $t$ is in window $n=2lfloor frac t0.4 rfloor+1$. Now compute how far you are into the window as $Delta t=t-0.4n$. If $Delta t lt 0.16$ you are in the previous window as well, so subtract $1$.
For the general case, $n=2lfloor frac tl_w rfloor+1, Delta t=t-l_wn$. If $Delta t lt xl_w$ you are in the previous window as well, so subtract $1$.
That formula is not general. In particular, it works only for this table. If you change $t_textw$ or $x$, it won't work. I am looking for a general formula. The table was just an example of one case
– Krishna
Jul 18 at 22:09
You can change $0.4$ to $l_w$ and $0.16$ to $xl_w$ and it works fine. It does depend on the structure of the overlap that you have defined, that every other window starts at a multiple of $l_w$. I have put that in
– Ross Millikan
Jul 18 at 22:49
My point is that I already tried your formula before posting here. For a completely different case, say $l_w = 0.72$ and $x=0.35$, will it work? I think my table is not generic enough. I shall change it tomorrow.
– Krishna
Jul 18 at 22:56
I believe it will. Do you have an example that says otherwise? Maybe I have not understood correctly how the overlap works. Would the start times then be $0,0.252,0.72,0.972,1.44,1.692,2.16$?
– Ross Millikan
Jul 18 at 22:59
I think my post was wrong. Sorry for wasting your time. I shall revise it soon
– Krishna
Jul 18 at 23:03
add a comment |Â
up vote
0
down vote
up vote
0
down vote
Start by considering only the odd numbered windows. Every time is in one of these and time $t$ is in window $n=2lfloor frac t0.4 rfloor+1$. Now compute how far you are into the window as $Delta t=t-0.4n$. If $Delta t lt 0.16$ you are in the previous window as well, so subtract $1$.
For the general case, $n=2lfloor frac tl_w rfloor+1, Delta t=t-l_wn$. If $Delta t lt xl_w$ you are in the previous window as well, so subtract $1$.
Start by considering only the odd numbered windows. Every time is in one of these and time $t$ is in window $n=2lfloor frac t0.4 rfloor+1$. Now compute how far you are into the window as $Delta t=t-0.4n$. If $Delta t lt 0.16$ you are in the previous window as well, so subtract $1$.
For the general case, $n=2lfloor frac tl_w rfloor+1, Delta t=t-l_wn$. If $Delta t lt xl_w$ you are in the previous window as well, so subtract $1$.
edited Jul 18 at 22:53
answered Jul 18 at 22:04


Ross Millikan
276k21186352
276k21186352
That formula is not general. In particular, it works only for this table. If you change $t_textw$ or $x$, it won't work. I am looking for a general formula. The table was just an example of one case
– Krishna
Jul 18 at 22:09
You can change $0.4$ to $l_w$ and $0.16$ to $xl_w$ and it works fine. It does depend on the structure of the overlap that you have defined, that every other window starts at a multiple of $l_w$. I have put that in
– Ross Millikan
Jul 18 at 22:49
My point is that I already tried your formula before posting here. For a completely different case, say $l_w = 0.72$ and $x=0.35$, will it work? I think my table is not generic enough. I shall change it tomorrow.
– Krishna
Jul 18 at 22:56
I believe it will. Do you have an example that says otherwise? Maybe I have not understood correctly how the overlap works. Would the start times then be $0,0.252,0.72,0.972,1.44,1.692,2.16$?
– Ross Millikan
Jul 18 at 22:59
I think my post was wrong. Sorry for wasting your time. I shall revise it soon
– Krishna
Jul 18 at 23:03
add a comment |Â
That formula is not general. In particular, it works only for this table. If you change $t_textw$ or $x$, it won't work. I am looking for a general formula. The table was just an example of one case
– Krishna
Jul 18 at 22:09
You can change $0.4$ to $l_w$ and $0.16$ to $xl_w$ and it works fine. It does depend on the structure of the overlap that you have defined, that every other window starts at a multiple of $l_w$. I have put that in
– Ross Millikan
Jul 18 at 22:49
My point is that I already tried your formula before posting here. For a completely different case, say $l_w = 0.72$ and $x=0.35$, will it work? I think my table is not generic enough. I shall change it tomorrow.
– Krishna
Jul 18 at 22:56
I believe it will. Do you have an example that says otherwise? Maybe I have not understood correctly how the overlap works. Would the start times then be $0,0.252,0.72,0.972,1.44,1.692,2.16$?
– Ross Millikan
Jul 18 at 22:59
I think my post was wrong. Sorry for wasting your time. I shall revise it soon
– Krishna
Jul 18 at 23:03
That formula is not general. In particular, it works only for this table. If you change $t_textw$ or $x$, it won't work. I am looking for a general formula. The table was just an example of one case
– Krishna
Jul 18 at 22:09
That formula is not general. In particular, it works only for this table. If you change $t_textw$ or $x$, it won't work. I am looking for a general formula. The table was just an example of one case
– Krishna
Jul 18 at 22:09
You can change $0.4$ to $l_w$ and $0.16$ to $xl_w$ and it works fine. It does depend on the structure of the overlap that you have defined, that every other window starts at a multiple of $l_w$. I have put that in
– Ross Millikan
Jul 18 at 22:49
You can change $0.4$ to $l_w$ and $0.16$ to $xl_w$ and it works fine. It does depend on the structure of the overlap that you have defined, that every other window starts at a multiple of $l_w$. I have put that in
– Ross Millikan
Jul 18 at 22:49
My point is that I already tried your formula before posting here. For a completely different case, say $l_w = 0.72$ and $x=0.35$, will it work? I think my table is not generic enough. I shall change it tomorrow.
– Krishna
Jul 18 at 22:56
My point is that I already tried your formula before posting here. For a completely different case, say $l_w = 0.72$ and $x=0.35$, will it work? I think my table is not generic enough. I shall change it tomorrow.
– Krishna
Jul 18 at 22:56
I believe it will. Do you have an example that says otherwise? Maybe I have not understood correctly how the overlap works. Would the start times then be $0,0.252,0.72,0.972,1.44,1.692,2.16$?
– Ross Millikan
Jul 18 at 22:59
I believe it will. Do you have an example that says otherwise? Maybe I have not understood correctly how the overlap works. Would the start times then be $0,0.252,0.72,0.972,1.44,1.692,2.16$?
– Ross Millikan
Jul 18 at 22:59
I think my post was wrong. Sorry for wasting your time. I shall revise it soon
– Krishna
Jul 18 at 23:03
I think my post was wrong. Sorry for wasting your time. I shall revise it soon
– Krishna
Jul 18 at 23:03
add a comment |Â
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
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2856050%2fhow-to-derive-the-formula-to-compute-an-integer-window-number-for-given-window-w%23new-answer', 'question_page');
);
Post as a guest
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
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
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