Discrete Math Rosen Question Section 2.3 49 & 50
These are questions from the Discrete Math textbook by Rosen, and I was just confused on what they're exactly asking: specifically when they write "... , when it is the larger/smaller of 2 integers". This might be an English issue, but are they saying if x is the larger of some random 2 integers then floor(x + 1/2) is not the closest integer to number x?
Kindly please help clarify
-
$\begingroup$ Try some simple values for $x$ and see if you can figure it out. It's often easier to discern what's happening when it's a concrete problem. $\endgroup$CyclotomicField– CyclotomicField2024年05月15日 23:11:38 +00:00Commented May 15, 2024 at 23:11
-
1$\begingroup$ Focus (for example) on the word midway in #48. Also, in general, my first try for all problems of this nature is to assume that $~x = P + r ~: ~P \in \Bbb{Z}, ~0 \leq r < 1.$ $\endgroup$user2661923– user26619232024年05月15日 23:19:56 +00:00Commented May 15, 2024 at 23:19
-
$\begingroup$ Do the two consecutive "when" phrases seem confusing to others too? I suppose the second "when" should be "then". The oldest answer below also interprets the second "when" as "then" (and the first "when" as "if"). $\endgroup$peterwhy– peterwhy2024年05月16日 00:48:16 +00:00Commented May 16, 2024 at 0:48
-
$\begingroup$ So the question is show floor(x + 1/2) is closest to x when floor(x + 1/2) is the larger of the 2 integers x is between, except when x is right in middle of the 2 integers? $\endgroup$Bob Marley– Bob Marley2024年05月16日 04:54:38 +00:00Commented May 16, 2024 at 4:54
-
$\begingroup$ Show A except when B when C, means (if not B then A is true else C is true). It’s more common to use "then" for the second when. $\endgroup$Eric– Eric2024年05月16日 23:37:08 +00:00Commented May 16, 2024 at 23:37
1 Answer 1
What the question is saying is that if $x$ is midway between two integers, then $\lfloor x + \frac{1}{2} \rfloor$ is equal to the larger of those two integers. In other words, if $x = n + \frac{1}{2}$, then that expression is equal to $n + 1$.
EDIT: To break down the question completely:
If $n \leq x < n +1$, then one of three things will happen:
$x$ will be closer to $n$ than $n + 1$, and $\lfloor x + \frac{1}{2}\rfloor = n$.
$x$ will be closer to $n + 1$ than $n$, and $\lfloor x + \frac{1}{2}\rfloor = n + 1$.
$x$ will be equally close to both $n$ and $n + 1$, i.e. it will be midway between the two integers, and $\lfloor x + \frac{1}{2}\rfloor = n + 1$.
Points 1 and 2 cover the case of "the closest integer to $x$", and point 3 covers the case where this is ambiguous because they are equal distance.
-
$\begingroup$ What about the part "... , when it is the larger/smaller of 2 integers?" $\endgroup$Bob Marley– Bob Marley2024年05月16日 00:29:57 +00:00Commented May 16, 2024 at 0:29
-
2$\begingroup$ That's exactly the part I'm talking about. In this sentence, "it" is not referring to $x,ドル it is referring to the expression $\lfloor x+\frac{1}{2}\rfloor$. Compare it to the sentence "The market is held at the nearby sports field, except when the weather is bad, when it is held in the auditorium". Here "it" is talking about the market, not the weather. $\endgroup$ConMan– ConMan2024年05月16日 00:33:06 +00:00Commented May 16, 2024 at 0:33
-
$\begingroup$ But then how is floor(x + 1/2) larger than both the 2 integers? $\endgroup$Bob Marley– Bob Marley2024年05月16日 04:40:56 +00:00Commented May 16, 2024 at 4:40
-
$\begingroup$ Wait nvm I think they mean larger of the 2 integers x is between? So the question is show floor(x + 1/2) is closest to x when floor(x + 1/2) is the larger of the 2 integers x is between? I'm so, then how can question be saying "if x is midway between two integers, then ⌊x + 1/2⌋ is equal to the larger of those two integers"? $\endgroup$Bob Marley– Bob Marley2024年05月16日 04:54:11 +00:00Commented May 16, 2024 at 4:54
-
$\begingroup$ I've edited my answer to explain the wording of the question fully. $\endgroup$ConMan– ConMan2024年05月16日 23:27:15 +00:00Commented May 16, 2024 at 23:27
You must log in to answer this question.
Explore related questions
See similar questions with these tags.