Insights Blog
-- Browse All Articles --
Physics Articles
Physics Tutorials
Physics Guides
Physics FAQ
Math Articles
Math Tutorials
Math Guides
Math FAQ
Education Articles
Education Guides
Bio/Chem Articles
Technology Guides
Computer Science Tutorials
Forums
Intro Physics Homework Help
Advanced Physics Homework Help
Precalculus Homework Help
Calculus Homework Help
Bio/Chem Homework Help
Engineering Homework Help
Trending
Featured Threads
Log in
Register
What's new
Search
Search
Search titles only
By:
Intro Physics Homework Help
Advanced Physics Homework Help
Precalculus Homework Help
Calculus Homework Help
Bio/Chem Homework Help
Engineering Homework Help
Menu
Log in
Register
Navigation
More options
Contact us
Close Menu
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Forums
Homework Help
Precalculus Mathematics Homework Help
Solving Modulo Arithmetic Problem with Variable Integer k
Reply to thread
Message
[QUOTE="Mentallic, post: 4496743, member: 144450"] I've stumbled across an arithmetic problem that's getting the better of me, so I need your help! I have a constant set of integers [itex][m,n], m>0, m\neq n[/itex] and a variable integer k>0. If we multiply k by successively increasing positive integers t, we will eventually get kt > m. Now, what I want is the output to be kt if [itex]kt \in [m,n][/itex] and n if [itex]kt>n[/itex]. So for example, let's consider m = 45, n = 50 and k = 8. We get the sequence 8, 16, 24, 32, 40, 48 At this point, we have a value larger or equal to m=45, and 48 < n=50 so the output is 48. For k=11 we have 11, 22, 33, 44, 55 Since we now have a value larger than m, but the value is also larger than n, the output needs to be n=50. So finally, my question is, can I create a function that isn't piecewise that defines this process? The piecewise function wasn't such a big deal, $$ f(k,m,n) = \begin{cases} \Big\lceil \frac{m}{k} \Big\rceil k, & \text{if}\hspace{5 mm} \Big\lceil \frac{m}{k} \Big\rceil k < n \\ \\ n, & \text{if}\hspace{5 mm} \Big\lceil \frac{m}{k} \Big\rceil k \geq n \end{cases} $$ But I can't figure out how to produce a non-piecewise function. [/QUOTE]
Insert quotes…
Post reply
Forums
Homework Help
Precalculus Mathematics Homework Help
Solving Modulo Arithmetic Problem with Variable Integer k
Back
Top