min/max definition

Thread Starter

Ryan$

Joined Dec 14, 2018
178
Hi guys,
I'm struggling something that maybe its already understandable to others but I found it a lil hard because I may not understand the definition of max/min perfectly... I have a program which it's giving me at "specific time" the minimal job process among other process that's found at that "specific time", for example lets say at t=2sec there was {p1,p2,p3} and given that p1 is the min process among others, then the program will give me {p1} .. I understand this ! but here is what confusing me, if I have over t=3sec one process, lets assume its {p2} then the program by default will print p2 because its minimal, but why it's minimal?! I know there's no other processes at t=3 , and only just p2 but how we determine its minimal? meaning if its only one job at specific time then we immediately say its minimal and program give me it..but why?! why it's minimal?! there's no other job to compare if it's minimal or not!

and if there any analog to our life that elaborate my confusing then would be appreciated if you claim it !


thank in advance !
 

bogosort

Joined Sep 24, 2011
696
It took me a few reads to parse your question, but I think the crux of it is this: Given a set of two or more numbers, some program returns the smallest member of the set. When given a single number, the program returns this number, and you want to know why.

If I interpreted you correctly, the only reasonable answer is that's how the programmer coded it. I agree with you that it makes no mathematical sense to choose the smaller number between, say, 42 and some non-existent number, but the programmer likely wrote the code to be robust against such queries.

Since this is the math forum, we might as well define the "min" relation as the programmer likely conceived it. Let "min" be the relation min:ℕ×ℕ → ℕ such that min(a, b) = a whenever a ≤ b or b = ∅. That last part is mathematically non-standard, but perfectly reasonable for a program dealing with arbitrary inputs.
 

Thread Starter

Ryan$

Joined Dec 14, 2018
178
It took me a few reads to parse your question, but I think the crux of it is this: Given a set of two or more numbers, some program returns the smallest member of the set. When given a single number, the program returns this number, and you want to know why.

If I interpreted you correctly, the only reasonable answer is that's how the programmer coded it. I agree with you that it makes no mathematical sense to choose the smaller number between, say, 42 and some non-existent number, but the programmer likely wrote the code to be robust against such queries.

Since this is the math forum, we might as well define the "min" relation as the programmer likely conceived it. Let "min" be the relation min:ℕ×ℕ → ℕ such that min(a, b) = a whenever a ≤ b or b = ∅. That last part is mathematically non-standard, but perfectly reasonable for a program dealing with arbitrary inputs.
But isn't min number in math maning ..the min value of the list? Specifically on a list with single number; the min of it is that number..my question why?! Why if there's just one number then its ofcourse the min one? What's the defention of min exactly over single value in the list?
 
Last edited:

bogosort

Joined Sep 24, 2011
696
Why if there's just one number then its ofcourse the min one?
Suppose our list of numbers is {2, 2, 2}. What is the min of that set? Note that the min is also the max! Conceptually, it's not a big jump to then say that the min (and max) of {2} is simply 2.

What's the defention of min exactly over single value in the list?
You're free to use whatever definition you want. For example, the people who wrote Java's Math class decided that their min method requires two arguments; calling it with one number will produce an error. But you're free to write a min method that takes a list of one or more numbers.

More generally, the definitions we use in mathematics are not in any way sacred. There is no such thing as the definition of min, or the definition of multiplication. Of course, we're most familiar with the "usual" arithmetic operations, and so we tend to think that a product AB is the same as the product BA. But there are many perfectly valid definitions of multiplication where this is not the case, e.g., when A and B are matrices. There are perfectly valid definitions of addition where the addition operation is idempotent: 1 + 1 = 1 (as in boolean algebras), or the addition operation is nilpotent: 1 + 1 = 0 (as in boolean rings). In math, definitions are just the starting point; the interesting stuff happens when we explore the consequences of the chosen definitions.
 
Top