Conversation started Jan 17, 2020 at 18:33.
Jan 17, 2020 18:33
Hi @Thorgott, glad your'e here. About that count of numbers divisible by $n$ between $a$ to $b$ problem, I want to clear up some misunderstandings:
How is $k > = a/n$ the smallest $k$ when for $a = 7$ $b = 14$ $n = 6$, $k >= a/n$ would mean that the smallest $k$ is $1$ which is not true. Isn't it more correct to say that $k >= a/n$ is the lower bound for $k$ and that the actual smallest $k$ can only be found by plugging a value for $k$ starting from (i.e. at or near) this lower bound into $nk >= a$? Like wise for $k <= b/n$.
Can you also confirm that $\lceil\frac bn\rceil + 1$ doesn't literally mean $b/n - \frac an + 1$ since I think $\lceil\frac bn\rceil$ and $\lceil \frac an \rceil$ are inequalities. I was trying to write a program that can count the number of numbers from $a$ to $b$ divisible by $n$ without using any for loop.
Am I right in thinking that the formula $\lceil \frac bn \rceil - \lceil \frac an\rceil + 1$ would still require me to loop over values of $k$ in the range $\frac bn$ to $\frac an$ and compare each value to the condition $nk >= a$ and the condition $nk <= b$ in order to find the smallest $nk >= a$ and the largest $nk <= b$ in the range $b/n$ to $\frac an$?
Formatting mistake, I meant to say "Can you also confirm that $\lceil\frac bn\rceil - \lceil \frac an \rceil + 1$ doesn't literally mean $\frac bn - \frac an + 1$"
In your example, $k=1$ yields $6$, which does not lie in the range from $7$ to $14$. Yes, $\lfloor\frac{b}{n}\rfloor-\lceil\frac{a}{n}\rceil+1$ is not the same as $\frac{b}{n}-\frac{a}{n}+1$, the former expression is always integer, the latter usually not (try computing some examples). Using a loop to count expressions in unnecessary, because we've already counted them. Computing $\lfloor\frac{b}{n}\rfloor$ is the same as rounding $\frac{b}{n}$ down, which I'm sure any computer can do for you.
@Thorgott if they are empty then the index set is the empty set, right?
Jan 17, 2020 18:52
@Thorgott if they are equal then $I$ is finite. If they're empty then what happens?
Here's what I mean: Let $I$ be an uncountable set and $A$ a countable set. Define $A_i=A$ for all $i\in I$. Then $(A_i)_{i\in I}$ is a collection of countable sets. Furthermore, $\bigcup_{i\in I}A_i=A$ is countable, but $I$ is uncountable.
@Thorgott I understand that $k = 1$ yields $6$. What I don't understand is for $k >= \frac an$ in the above example when $a = 7$ and $n = 6$ then the inequality $k >= 7/6$ (i.e. $k >= 1)$ means that $k$ is greater than or equal to $1$, but the minimum $k$ is $2$ for the example $a = 7$ $b = 14$ $n = 6$. Basically I'm asking why does the condition $k >= \frac an$ hold when $k = 1$ even though $k = 1$ is not the smallest $k$
It doesn't. $1\not\ge7/6$
Oh crap, sorry @Thorgott I'm used to rounding down in programming that I forgot you don't round down in mathematics
Finding the smallest natural number $k\ge\frac{a}{n}$ is the same as rounding $\frac{a}{n}$ up, so that's what you want to do.
Jan 17, 2020 19:00
Yes $ 1 \not\ge1.166666667$
So your'e saying that for example you round $1.166666667$ to $2$?
Yes. And $k=2$ is the right answer.
If you round up for $k \ge \frac an$ does that mean that you round down for $k \le \frac bn$?
I'm guessing thats why you round down for $k \ge \frac an$?
Yes, you round $\frac{a}{n}$ up and $\frac{b}{n}$ down. That's exactly what $\lceil\frac{a}{n}\rceil$ and $\lfloor\frac{b}{n}\rfloor$ mean, respectively.
Wow that makes so much sense. What are those type of brackets called?
In mathematics and computer science, the floor function is the function that takes as input a real number x {\displaystyle x} and gives as output the greatest integer less than or equal to x {\displaystyle x} , denoted floor ⁡ ( x ) = ⌊ x ⌋ {\displaystyle \operatorname {floor} (x)=\lfloor x\rfloor } . Similarly, the ceiling function maps x {\displaystyle x} to the...
Jan 17, 2020 19:12
@Thank you, the celing function $\lceil \frac an \rceil$ and floor function $\lfloor \frac bn\rfloor$ are quite intuitive
@Thorgott now I understand $k \ge \frac an$ and $k \le \frac bn$ perfectly and that the former's celing function rounds up and the latter's floor function rounds down that answers my second question about what $\lceil \frac an\rceil - \lfloor \frac bn\rfloor + 1$ means
Jan 17, 2020 19:37
If $(X_i)_{j \in J}$ is a collection of $n-manifolds$ and their disjoint union is an n-manifold then $J$ is countable.
I\m still quite stuck on this
Demonstrating failure of second-countability in case of $J$ uncountable sounds like a good approach
Jan 17, 2020 19:55
@Thorgott. I can define a map $f$ $:$ $I \rightarrow X_i^*$ (where $X_i^*$ is the image of the canonical injection), the map is injective so $I$ is countable?
@Thorgott thank you. Your'e right that using a loop to count expressions is unnecessary, because we've already counted them. I have computed the expression $\lfloor \frac bn \rfloor - \lceil \frac bn \rceil + 1$ that allows me to observe that this expression has already counted the number of natural numbers divisible by $n$ between $a$ and $b$ and also that this expression is always integer.
@Thorgott your responses have been immensely helpful, thanks a lot! Is there a way to bookmark a conversation or series of comments in this chat room so that I could quickly refer to it?
 
Conversation ended Jan 17, 2020 at 19:58.