Distance between dots in an interval











up vote
0
down vote

favorite












In the closed interval [0, 1] there are 999 equally spaced red dots and 1,110 equally spaced blue dots (not on the endpoints). Thus the red dots divide the interval into 1,000 subintervals and the blue dots divide the interval into 1,111 subintervals.
What is the smallest distance beween any two points within this interval and how many pairs $(r_i, b_k)$ exist, i.e. pairs in which a red dot is followed by a blue dot?



My tentative thoughts (that didn´t get me any further): Draw a square $ABCD$ with coordinates $A(0, 0), B(0,1), C(1,1)$ and $D(0,1)$ into a cartesian coordinate system. Draw a grid (wlog) with 1,110 parallel lines to the x-axis and 999 lines parallel to the y-axis. The diagonal $y = x$ intersects the grid lines at $(x_i, y_j)$ and the minimum distance to the grid line ist he solution. How can I solve this?










share|cite|improve this question
























  • Are there both red and blue dots at the endpoints $0,1$?
    – coffeemath
    Nov 15 at 22:46






  • 1




    No, only within the interval.
    – jeremiah
    Nov 15 at 22:57















up vote
0
down vote

favorite












In the closed interval [0, 1] there are 999 equally spaced red dots and 1,110 equally spaced blue dots (not on the endpoints). Thus the red dots divide the interval into 1,000 subintervals and the blue dots divide the interval into 1,111 subintervals.
What is the smallest distance beween any two points within this interval and how many pairs $(r_i, b_k)$ exist, i.e. pairs in which a red dot is followed by a blue dot?



My tentative thoughts (that didn´t get me any further): Draw a square $ABCD$ with coordinates $A(0, 0), B(0,1), C(1,1)$ and $D(0,1)$ into a cartesian coordinate system. Draw a grid (wlog) with 1,110 parallel lines to the x-axis and 999 lines parallel to the y-axis. The diagonal $y = x$ intersects the grid lines at $(x_i, y_j)$ and the minimum distance to the grid line ist he solution. How can I solve this?










share|cite|improve this question
























  • Are there both red and blue dots at the endpoints $0,1$?
    – coffeemath
    Nov 15 at 22:46






  • 1




    No, only within the interval.
    – jeremiah
    Nov 15 at 22:57













up vote
0
down vote

favorite









up vote
0
down vote

favorite











In the closed interval [0, 1] there are 999 equally spaced red dots and 1,110 equally spaced blue dots (not on the endpoints). Thus the red dots divide the interval into 1,000 subintervals and the blue dots divide the interval into 1,111 subintervals.
What is the smallest distance beween any two points within this interval and how many pairs $(r_i, b_k)$ exist, i.e. pairs in which a red dot is followed by a blue dot?



My tentative thoughts (that didn´t get me any further): Draw a square $ABCD$ with coordinates $A(0, 0), B(0,1), C(1,1)$ and $D(0,1)$ into a cartesian coordinate system. Draw a grid (wlog) with 1,110 parallel lines to the x-axis and 999 lines parallel to the y-axis. The diagonal $y = x$ intersects the grid lines at $(x_i, y_j)$ and the minimum distance to the grid line ist he solution. How can I solve this?










share|cite|improve this question















In the closed interval [0, 1] there are 999 equally spaced red dots and 1,110 equally spaced blue dots (not on the endpoints). Thus the red dots divide the interval into 1,000 subintervals and the blue dots divide the interval into 1,111 subintervals.
What is the smallest distance beween any two points within this interval and how many pairs $(r_i, b_k)$ exist, i.e. pairs in which a red dot is followed by a blue dot?



My tentative thoughts (that didn´t get me any further): Draw a square $ABCD$ with coordinates $A(0, 0), B(0,1), C(1,1)$ and $D(0,1)$ into a cartesian coordinate system. Draw a grid (wlog) with 1,110 parallel lines to the x-axis and 999 lines parallel to the y-axis. The diagonal $y = x$ intersects the grid lines at $(x_i, y_j)$ and the minimum distance to the grid line ist he solution. How can I solve this?







elementary-number-theory






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Nov 15 at 23:00

























asked Nov 15 at 22:43









jeremiah

104




104












  • Are there both red and blue dots at the endpoints $0,1$?
    – coffeemath
    Nov 15 at 22:46






  • 1




    No, only within the interval.
    – jeremiah
    Nov 15 at 22:57


















  • Are there both red and blue dots at the endpoints $0,1$?
    – coffeemath
    Nov 15 at 22:46






  • 1




    No, only within the interval.
    – jeremiah
    Nov 15 at 22:57
















Are there both red and blue dots at the endpoints $0,1$?
– coffeemath
Nov 15 at 22:46




Are there both red and blue dots at the endpoints $0,1$?
– coffeemath
Nov 15 at 22:46




1




1




No, only within the interval.
– jeremiah
Nov 15 at 22:57




No, only within the interval.
– jeremiah
Nov 15 at 22:57










2 Answers
2






active

oldest

votes

















up vote
1
down vote



accepted










If we have $ninmathbb N$ dots equally spaced in $(0,1)subseteqmathbb R$, not including the endpoints, they must have distance $1/(n+1)$ apart. Thus, the sets of dots have the following positions:



$$text{red dots}:Big{frac{1}{1000},frac{2}{1000},frac{3}{1000},dots,frac{999}{1000}Big}$$



$$text{blue dots}:Big{frac{1}{1111},frac{2}{1111},frac{3}{1111},dots,frac{1110}{1111}Big}$$



The distance between any two red and blue dots is $|frac{m}{1000}-frac{n}{1111}|$ for integers $m$ and $n$. The question becomes, what is the minimum value of $|frac{m}{1000}-frac{n}{1111}|$ for positive integers $mleq 999$ and $nleq 1110$?



$$Big|frac{m}{1000}-frac{n}{1111}Big|=frac{|1111m-1000n|}{1000*1111}$$



To minimize this fraction is to minimize its numerator. And it is known that the $gcd$ of two integers is their smallest positive integral linear combination (Bézout's identity). That is, the minimum value of the numerator is $gcd(1111,1000)$, which is $1$ since they are relatively prime. Thus the minimal distance is $1/1111000$. For example, take $m=9$ and $n=10$, the points $9/1000$ and $10/1111$ are of the proper distance apart.






share|cite|improve this answer























  • This is a very elegant solution, clear and well written. I was on a completely wrong track. Could you provide an idea or hint how to figure out the number of red and blue dot pairs?Thanks so much.
    – jeremiah
    Nov 15 at 23:30










  • I think (without proof) that the number of such pairs is the number of whichever dots there are less of. At this point it's important that $1000$ and $1111$ are relatively prime so that the dots never overlap in the interval (only at the endpoints). Therefore you can guarantee that at least one blue dot lies strictly between every consecutive pair of red dots, so every red dot is a solution.
    – M. Nestor
    Nov 15 at 23:35












  • Thank you - helps me a lot (and shows me that I´ve got to learn a lot too)
    – jeremiah
    Nov 15 at 23:37


















up vote
1
down vote













If my understanding of the question is correct, since the distance between blue dots are smaller than the distance between red dots, you cannot place 2 red dots without having at least 1 blue dot in between. In other words, the number of pairs should be equal to the number of red dots 999.



Regarding the first part of the question, it could be converted into a minimization problem by minimizing the absolute value of ( a/1000 - b/1111).



Another simpler approach could be by using mod. (stretching the 0-1 interval to 0-1000*1111 to avoid writing in divisive form)



Now for first dots the difference is 111. The difference between nth blue dot and nth red dot is 111n. We need to now think in terms of 111n mod(1000) and 111n mod(1111) as that distance between nth dots would be closed by either a blue or red dot. Intuitively, when n is 9, 111n mod 1000 becomes -1, which means the next dot with smaller interval (blue) is 1 place after the 9th red ball. Thus we can say the distance between 9th red ball and 10th blue ball is the smallest (10000 - 9999 = 1). Back in absolute terms, 10/1111 - 9/1000 would be the smallest answer possible.



You can confirm that this is indeed the smallest possible, since distance between nth red dot and mth blue dot would be
m/1111 - n/1000



Since both n and m are integers we know that 1000n - 1111m would be integer as well. This leaves us with the final answer of (1000n-1111m) / (1000*1111) which cannot be smaller than 1/(1000*1111) as the top part of the division is an integer and 1000 and 1111 don't have any common divisor but 1.



hope it helps






share|cite|improve this answer

















  • 1




    And indeed it helps! Very well written. I much appreciate your effort thank you.
    – jeremiah
    Nov 15 at 23:34











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',
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%2f3000436%2fdistance-between-dots-in-an-interval%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
1
down vote



accepted










If we have $ninmathbb N$ dots equally spaced in $(0,1)subseteqmathbb R$, not including the endpoints, they must have distance $1/(n+1)$ apart. Thus, the sets of dots have the following positions:



$$text{red dots}:Big{frac{1}{1000},frac{2}{1000},frac{3}{1000},dots,frac{999}{1000}Big}$$



$$text{blue dots}:Big{frac{1}{1111},frac{2}{1111},frac{3}{1111},dots,frac{1110}{1111}Big}$$



The distance between any two red and blue dots is $|frac{m}{1000}-frac{n}{1111}|$ for integers $m$ and $n$. The question becomes, what is the minimum value of $|frac{m}{1000}-frac{n}{1111}|$ for positive integers $mleq 999$ and $nleq 1110$?



$$Big|frac{m}{1000}-frac{n}{1111}Big|=frac{|1111m-1000n|}{1000*1111}$$



To minimize this fraction is to minimize its numerator. And it is known that the $gcd$ of two integers is their smallest positive integral linear combination (Bézout's identity). That is, the minimum value of the numerator is $gcd(1111,1000)$, which is $1$ since they are relatively prime. Thus the minimal distance is $1/1111000$. For example, take $m=9$ and $n=10$, the points $9/1000$ and $10/1111$ are of the proper distance apart.






share|cite|improve this answer























  • This is a very elegant solution, clear and well written. I was on a completely wrong track. Could you provide an idea or hint how to figure out the number of red and blue dot pairs?Thanks so much.
    – jeremiah
    Nov 15 at 23:30










  • I think (without proof) that the number of such pairs is the number of whichever dots there are less of. At this point it's important that $1000$ and $1111$ are relatively prime so that the dots never overlap in the interval (only at the endpoints). Therefore you can guarantee that at least one blue dot lies strictly between every consecutive pair of red dots, so every red dot is a solution.
    – M. Nestor
    Nov 15 at 23:35












  • Thank you - helps me a lot (and shows me that I´ve got to learn a lot too)
    – jeremiah
    Nov 15 at 23:37















up vote
1
down vote



accepted










If we have $ninmathbb N$ dots equally spaced in $(0,1)subseteqmathbb R$, not including the endpoints, they must have distance $1/(n+1)$ apart. Thus, the sets of dots have the following positions:



$$text{red dots}:Big{frac{1}{1000},frac{2}{1000},frac{3}{1000},dots,frac{999}{1000}Big}$$



$$text{blue dots}:Big{frac{1}{1111},frac{2}{1111},frac{3}{1111},dots,frac{1110}{1111}Big}$$



The distance between any two red and blue dots is $|frac{m}{1000}-frac{n}{1111}|$ for integers $m$ and $n$. The question becomes, what is the minimum value of $|frac{m}{1000}-frac{n}{1111}|$ for positive integers $mleq 999$ and $nleq 1110$?



$$Big|frac{m}{1000}-frac{n}{1111}Big|=frac{|1111m-1000n|}{1000*1111}$$



To minimize this fraction is to minimize its numerator. And it is known that the $gcd$ of two integers is their smallest positive integral linear combination (Bézout's identity). That is, the minimum value of the numerator is $gcd(1111,1000)$, which is $1$ since they are relatively prime. Thus the minimal distance is $1/1111000$. For example, take $m=9$ and $n=10$, the points $9/1000$ and $10/1111$ are of the proper distance apart.






share|cite|improve this answer























  • This is a very elegant solution, clear and well written. I was on a completely wrong track. Could you provide an idea or hint how to figure out the number of red and blue dot pairs?Thanks so much.
    – jeremiah
    Nov 15 at 23:30










  • I think (without proof) that the number of such pairs is the number of whichever dots there are less of. At this point it's important that $1000$ and $1111$ are relatively prime so that the dots never overlap in the interval (only at the endpoints). Therefore you can guarantee that at least one blue dot lies strictly between every consecutive pair of red dots, so every red dot is a solution.
    – M. Nestor
    Nov 15 at 23:35












  • Thank you - helps me a lot (and shows me that I´ve got to learn a lot too)
    – jeremiah
    Nov 15 at 23:37













up vote
1
down vote



accepted







up vote
1
down vote



accepted






If we have $ninmathbb N$ dots equally spaced in $(0,1)subseteqmathbb R$, not including the endpoints, they must have distance $1/(n+1)$ apart. Thus, the sets of dots have the following positions:



$$text{red dots}:Big{frac{1}{1000},frac{2}{1000},frac{3}{1000},dots,frac{999}{1000}Big}$$



$$text{blue dots}:Big{frac{1}{1111},frac{2}{1111},frac{3}{1111},dots,frac{1110}{1111}Big}$$



The distance between any two red and blue dots is $|frac{m}{1000}-frac{n}{1111}|$ for integers $m$ and $n$. The question becomes, what is the minimum value of $|frac{m}{1000}-frac{n}{1111}|$ for positive integers $mleq 999$ and $nleq 1110$?



$$Big|frac{m}{1000}-frac{n}{1111}Big|=frac{|1111m-1000n|}{1000*1111}$$



To minimize this fraction is to minimize its numerator. And it is known that the $gcd$ of two integers is their smallest positive integral linear combination (Bézout's identity). That is, the minimum value of the numerator is $gcd(1111,1000)$, which is $1$ since they are relatively prime. Thus the minimal distance is $1/1111000$. For example, take $m=9$ and $n=10$, the points $9/1000$ and $10/1111$ are of the proper distance apart.






share|cite|improve this answer














If we have $ninmathbb N$ dots equally spaced in $(0,1)subseteqmathbb R$, not including the endpoints, they must have distance $1/(n+1)$ apart. Thus, the sets of dots have the following positions:



$$text{red dots}:Big{frac{1}{1000},frac{2}{1000},frac{3}{1000},dots,frac{999}{1000}Big}$$



$$text{blue dots}:Big{frac{1}{1111},frac{2}{1111},frac{3}{1111},dots,frac{1110}{1111}Big}$$



The distance between any two red and blue dots is $|frac{m}{1000}-frac{n}{1111}|$ for integers $m$ and $n$. The question becomes, what is the minimum value of $|frac{m}{1000}-frac{n}{1111}|$ for positive integers $mleq 999$ and $nleq 1110$?



$$Big|frac{m}{1000}-frac{n}{1111}Big|=frac{|1111m-1000n|}{1000*1111}$$



To minimize this fraction is to minimize its numerator. And it is known that the $gcd$ of two integers is their smallest positive integral linear combination (Bézout's identity). That is, the minimum value of the numerator is $gcd(1111,1000)$, which is $1$ since they are relatively prime. Thus the minimal distance is $1/1111000$. For example, take $m=9$ and $n=10$, the points $9/1000$ and $10/1111$ are of the proper distance apart.







share|cite|improve this answer














share|cite|improve this answer



share|cite|improve this answer








edited Nov 15 at 23:43

























answered Nov 15 at 23:18









M. Nestor

69210




69210












  • This is a very elegant solution, clear and well written. I was on a completely wrong track. Could you provide an idea or hint how to figure out the number of red and blue dot pairs?Thanks so much.
    – jeremiah
    Nov 15 at 23:30










  • I think (without proof) that the number of such pairs is the number of whichever dots there are less of. At this point it's important that $1000$ and $1111$ are relatively prime so that the dots never overlap in the interval (only at the endpoints). Therefore you can guarantee that at least one blue dot lies strictly between every consecutive pair of red dots, so every red dot is a solution.
    – M. Nestor
    Nov 15 at 23:35












  • Thank you - helps me a lot (and shows me that I´ve got to learn a lot too)
    – jeremiah
    Nov 15 at 23:37


















  • This is a very elegant solution, clear and well written. I was on a completely wrong track. Could you provide an idea or hint how to figure out the number of red and blue dot pairs?Thanks so much.
    – jeremiah
    Nov 15 at 23:30










  • I think (without proof) that the number of such pairs is the number of whichever dots there are less of. At this point it's important that $1000$ and $1111$ are relatively prime so that the dots never overlap in the interval (only at the endpoints). Therefore you can guarantee that at least one blue dot lies strictly between every consecutive pair of red dots, so every red dot is a solution.
    – M. Nestor
    Nov 15 at 23:35












  • Thank you - helps me a lot (and shows me that I´ve got to learn a lot too)
    – jeremiah
    Nov 15 at 23:37
















This is a very elegant solution, clear and well written. I was on a completely wrong track. Could you provide an idea or hint how to figure out the number of red and blue dot pairs?Thanks so much.
– jeremiah
Nov 15 at 23:30




This is a very elegant solution, clear and well written. I was on a completely wrong track. Could you provide an idea or hint how to figure out the number of red and blue dot pairs?Thanks so much.
– jeremiah
Nov 15 at 23:30












I think (without proof) that the number of such pairs is the number of whichever dots there are less of. At this point it's important that $1000$ and $1111$ are relatively prime so that the dots never overlap in the interval (only at the endpoints). Therefore you can guarantee that at least one blue dot lies strictly between every consecutive pair of red dots, so every red dot is a solution.
– M. Nestor
Nov 15 at 23:35






I think (without proof) that the number of such pairs is the number of whichever dots there are less of. At this point it's important that $1000$ and $1111$ are relatively prime so that the dots never overlap in the interval (only at the endpoints). Therefore you can guarantee that at least one blue dot lies strictly between every consecutive pair of red dots, so every red dot is a solution.
– M. Nestor
Nov 15 at 23:35














Thank you - helps me a lot (and shows me that I´ve got to learn a lot too)
– jeremiah
Nov 15 at 23:37




Thank you - helps me a lot (and shows me that I´ve got to learn a lot too)
– jeremiah
Nov 15 at 23:37










up vote
1
down vote













If my understanding of the question is correct, since the distance between blue dots are smaller than the distance between red dots, you cannot place 2 red dots without having at least 1 blue dot in between. In other words, the number of pairs should be equal to the number of red dots 999.



Regarding the first part of the question, it could be converted into a minimization problem by minimizing the absolute value of ( a/1000 - b/1111).



Another simpler approach could be by using mod. (stretching the 0-1 interval to 0-1000*1111 to avoid writing in divisive form)



Now for first dots the difference is 111. The difference between nth blue dot and nth red dot is 111n. We need to now think in terms of 111n mod(1000) and 111n mod(1111) as that distance between nth dots would be closed by either a blue or red dot. Intuitively, when n is 9, 111n mod 1000 becomes -1, which means the next dot with smaller interval (blue) is 1 place after the 9th red ball. Thus we can say the distance between 9th red ball and 10th blue ball is the smallest (10000 - 9999 = 1). Back in absolute terms, 10/1111 - 9/1000 would be the smallest answer possible.



You can confirm that this is indeed the smallest possible, since distance between nth red dot and mth blue dot would be
m/1111 - n/1000



Since both n and m are integers we know that 1000n - 1111m would be integer as well. This leaves us with the final answer of (1000n-1111m) / (1000*1111) which cannot be smaller than 1/(1000*1111) as the top part of the division is an integer and 1000 and 1111 don't have any common divisor but 1.



hope it helps






share|cite|improve this answer

















  • 1




    And indeed it helps! Very well written. I much appreciate your effort thank you.
    – jeremiah
    Nov 15 at 23:34















up vote
1
down vote













If my understanding of the question is correct, since the distance between blue dots are smaller than the distance between red dots, you cannot place 2 red dots without having at least 1 blue dot in between. In other words, the number of pairs should be equal to the number of red dots 999.



Regarding the first part of the question, it could be converted into a minimization problem by minimizing the absolute value of ( a/1000 - b/1111).



Another simpler approach could be by using mod. (stretching the 0-1 interval to 0-1000*1111 to avoid writing in divisive form)



Now for first dots the difference is 111. The difference between nth blue dot and nth red dot is 111n. We need to now think in terms of 111n mod(1000) and 111n mod(1111) as that distance between nth dots would be closed by either a blue or red dot. Intuitively, when n is 9, 111n mod 1000 becomes -1, which means the next dot with smaller interval (blue) is 1 place after the 9th red ball. Thus we can say the distance between 9th red ball and 10th blue ball is the smallest (10000 - 9999 = 1). Back in absolute terms, 10/1111 - 9/1000 would be the smallest answer possible.



You can confirm that this is indeed the smallest possible, since distance between nth red dot and mth blue dot would be
m/1111 - n/1000



Since both n and m are integers we know that 1000n - 1111m would be integer as well. This leaves us with the final answer of (1000n-1111m) / (1000*1111) which cannot be smaller than 1/(1000*1111) as the top part of the division is an integer and 1000 and 1111 don't have any common divisor but 1.



hope it helps






share|cite|improve this answer

















  • 1




    And indeed it helps! Very well written. I much appreciate your effort thank you.
    – jeremiah
    Nov 15 at 23:34













up vote
1
down vote










up vote
1
down vote









If my understanding of the question is correct, since the distance between blue dots are smaller than the distance between red dots, you cannot place 2 red dots without having at least 1 blue dot in between. In other words, the number of pairs should be equal to the number of red dots 999.



Regarding the first part of the question, it could be converted into a minimization problem by minimizing the absolute value of ( a/1000 - b/1111).



Another simpler approach could be by using mod. (stretching the 0-1 interval to 0-1000*1111 to avoid writing in divisive form)



Now for first dots the difference is 111. The difference between nth blue dot and nth red dot is 111n. We need to now think in terms of 111n mod(1000) and 111n mod(1111) as that distance between nth dots would be closed by either a blue or red dot. Intuitively, when n is 9, 111n mod 1000 becomes -1, which means the next dot with smaller interval (blue) is 1 place after the 9th red ball. Thus we can say the distance between 9th red ball and 10th blue ball is the smallest (10000 - 9999 = 1). Back in absolute terms, 10/1111 - 9/1000 would be the smallest answer possible.



You can confirm that this is indeed the smallest possible, since distance between nth red dot and mth blue dot would be
m/1111 - n/1000



Since both n and m are integers we know that 1000n - 1111m would be integer as well. This leaves us with the final answer of (1000n-1111m) / (1000*1111) which cannot be smaller than 1/(1000*1111) as the top part of the division is an integer and 1000 and 1111 don't have any common divisor but 1.



hope it helps






share|cite|improve this answer












If my understanding of the question is correct, since the distance between blue dots are smaller than the distance between red dots, you cannot place 2 red dots without having at least 1 blue dot in between. In other words, the number of pairs should be equal to the number of red dots 999.



Regarding the first part of the question, it could be converted into a minimization problem by minimizing the absolute value of ( a/1000 - b/1111).



Another simpler approach could be by using mod. (stretching the 0-1 interval to 0-1000*1111 to avoid writing in divisive form)



Now for first dots the difference is 111. The difference between nth blue dot and nth red dot is 111n. We need to now think in terms of 111n mod(1000) and 111n mod(1111) as that distance between nth dots would be closed by either a blue or red dot. Intuitively, when n is 9, 111n mod 1000 becomes -1, which means the next dot with smaller interval (blue) is 1 place after the 9th red ball. Thus we can say the distance between 9th red ball and 10th blue ball is the smallest (10000 - 9999 = 1). Back in absolute terms, 10/1111 - 9/1000 would be the smallest answer possible.



You can confirm that this is indeed the smallest possible, since distance between nth red dot and mth blue dot would be
m/1111 - n/1000



Since both n and m are integers we know that 1000n - 1111m would be integer as well. This leaves us with the final answer of (1000n-1111m) / (1000*1111) which cannot be smaller than 1/(1000*1111) as the top part of the division is an integer and 1000 and 1111 don't have any common divisor but 1.



hope it helps







share|cite|improve this answer












share|cite|improve this answer



share|cite|improve this answer










answered Nov 15 at 23:27









Ofya

3366




3366








  • 1




    And indeed it helps! Very well written. I much appreciate your effort thank you.
    – jeremiah
    Nov 15 at 23:34














  • 1




    And indeed it helps! Very well written. I much appreciate your effort thank you.
    – jeremiah
    Nov 15 at 23:34








1




1




And indeed it helps! Very well written. I much appreciate your effort thank you.
– jeremiah
Nov 15 at 23:34




And indeed it helps! Very well written. I much appreciate your effort thank you.
– jeremiah
Nov 15 at 23:34


















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.





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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3000436%2fdistance-between-dots-in-an-interval%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

How to change which sound is reproduced for terminal bell?

Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

Can I use Tabulator js library in my java Spring + Thymeleaf project?