Is this problem solvable analytically?

  • Context: Graduate 
  • Thread starter Thread starter Werg22
  • Start date Start date
Click For Summary

Discussion Overview

The discussion revolves around the problem of determining the optimal value of m that minimizes the number of printings k required by a device that prints on a row of n squares. The focus is on whether this problem can be solved analytically, considering both discrete and continuous cases.

Discussion Character

  • Exploratory
  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • Some participants propose that the minimums of the function k = m + ⌈(n - m)/m⌉ coincide with the minimum of the continuous function k = m + (n - m)/m.
  • Others argue that the derivative can be used to find a minimum, suggesting that m should be less than or equal to √n.
  • A participant mentions the need to compare values around √n to determine the minimum k in the discrete case, emphasizing the importance of the ceiling and floor functions.
  • Some participants express skepticism about the existence of an analytical solution, suggesting that checking integer values near the minimum derived from the continuous function may be necessary.
  • There is a discussion on the implications of integer versus non-integer values of n/m, with a participant noting that this distinction affects the expression for k.
  • One participant relates the problem to the theory of encoding strings of numbers efficiently, indicating a broader context for the discussion.

Areas of Agreement / Disagreement

Participants do not reach a consensus on whether an analytical solution exists. There are competing views on how to approach the problem, particularly regarding the treatment of discrete versus continuous cases and the implications of integer values.

Contextual Notes

Limitations include the dependence on the definitions of ceiling and floor functions, as well as the unresolved nature of the mathematical steps involved in transitioning from continuous to discrete cases.

Werg22
Messages
1,431
Reaction score
1
Suppose we have a row of n squares. A device is made such as it prints on the squares. This device can print every square individually, or "copy" m squares and "paste" them on the rest of the row. For example, the device could print first 5 squares of a 80 squares row, individually, then take these 5 squares and paste them 15 times on the remaining 75 squares. This gives in total of 5 + 15 = 20 printings. Now, suppose we have any natural number of squares in the row. If we chose to print m squares before pasting them on the rest of the row, the number of printings k is

[tex]k = m + \left \lceil \frac{n - m}{m} \right \rceil[/tex]

Now since this is a discrete function, is there a way to analytically determine which value m will give the least number of printings?
 
Last edited:
Mathematics news on Phys.org
I have strong evidence that the minimums of

[tex]m + \left \lceil \frac{n - m}{m} \right \rceil[/tex]

coincide with the minimum of

[tex]m + \frac{n - m}{m}[/tex]

With [itex]m[/itex] as a continuous variable, this is easy to analyze. Now we just have to show that [itex]m[/itex] that achieves the minimum value of this function gives a minimizing [itex]m[/itex] for the discrete case as well (by rounding, ceiling, or floor, I don't know).
 
“k” is the number of printings. “n” is a constant the total number of squares. For a given value of “n” you want to know for what value of “m” is ”k” lowest. “k” is a function of “m” so if one were to have a graph of that one would look for the lowest point on that graph, or its minimum. The analytic technique you seek is the derivative. Rewriting your equation to:

[tex]k=m+\frac{n}{m}-1[/tex]
[tex]\frac{\delta k}{\delta m} = 1 - \frac{n}{m^2} + 0 = 0 \mbox{ at a mimimum (or maximum)}[/tex]
[tex]m =< \sqrt{n}[/tex]
 
Last edited:
Well, Moo Of Doom, I did try to go in that direction... we get [tex]\sqrt{n}[/tex] as the minimum. Now, if you were dealing with the continuous function, we would have to compare the values of ceiling of n and the floor and chose the lowest. Now if we have [tex]a < b < \sqrt{n}[/tex], we need to show that[tex]a + \left \lceil \frac{n - a}{a} \right \rceil > b + \left \lceil \frac{n - b}{b} \right \rceil[/tex]

and for [tex]a > b > \sqrt{n}[/tex][tex]a + \left \lceil \frac{n - a}{a} \right \rceil > b + \left \lceil \frac{n - b}{b} \right \rceil[/tex]
Edit; NanoTec: there was never any question on weather or not we needed to make use of differentiation here... the problem here is that we're dealing with a discrete function and not a continuous one...
 
Last edited:
I don't think there is an analytical solution. but it is quite the same except that you need to check a couple values.

you can rewrite things in terms of fractional function... ie {x}= fractional part of x, you'll get
[tex]k=m+\frac{n}{m}-\left\{\frac{n}{m}\right\}[/tex]
so
[tex]k\ge m+\frac{n}{m} \ge 2\sqrt{n}[/tex]

find m that minimizes [tex]m+\frac{n}{m}[/tex]
find a couple integers that are near that value of m. find the k values for them and compare. the min of k should occur around this neighborhood since the fractional part of anything is less than 1. whenever you get a difference in k (from the min) that is greater than 1 when you vary m, you are done (in other words, the fractional part will never make up for the difference of 1).
 
Last edited:
This is related to the theory of encoding strings of numbers in the most compact manner. You're asking for an efficient way of encoding a binary number- taking into account that there could be repeats in the string.
 
Tim Lou: Your expression of k is only valid for non-integer n/m. It is the same as the expression

[tex]k = m + \left \lfloor \frac{n}{m} \right \rfloor[/tex]

Which clearly shows that for an integer n/m, we get a different expression than what originally intended.
 
Werg22 said:
Tim Lou: Your expression of k is only valid for non-integer n/m. It is the same as the expression

[tex]k = m + \left \lfloor \frac{n}{m} \right \rfloor[/tex]

Which clearly shows that for an integer n/m, we get a different expression than what originally intended.

yes, you are correct, for that we can let {x}=fraction part of x when x is not an integer, and =1 when x is an integer. still {x} is bounded by 1.
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
7
Views
2K
  • · Replies 11 ·
Replies
11
Views
5K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 10 ·
Replies
10
Views
4K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K