A function without a maximum and a minimum

James LeBron
Messages
23
Reaction score
0

Homework Statement



Give an example of a non-continuous function on [0,1] that has no maximum and no minimum.

Homework Equations



Well, a continuous function on a non-empty compact set will have a maximum and a minimum, so I guess this is why we need a non-continuous function.

The Attempt at a Solution



Does this work?

f(x) =

1/2 if x is a rational number
x if x is an irrational number.

Does this work? Breaking this up into 1/2s (if rational) and x's (if irrational) hopefully makes it non-continuous, and I suppose there is always some larger number that could be formed as we approach 1 (so no maximum). What do you think?
 
Physics news on Phys.org
I would agree.
 
Thread 'Use greedy vertex coloring algorithm to prove the upper bound of χ'
Hi! I am struggling with the exercise I mentioned under "Homework statement". The exercise is about a specific "greedy vertex coloring algorithm". One definition (which matches what my book uses) can be found here: https://people.cs.uchicago.edu/~laci/HANDOUTS/greedycoloring.pdf Here is also a screenshot of the relevant parts of the linked PDF, i.e. the def. of the algorithm: Sadly I don't have much to show as far as a solution attempt goes, as I am stuck on how to proceed. I thought...
Back
Top