1

I searched extensively and cant figure out what the infinity sign is meant in this pseudocode. enter image description here

closed as off-topic by Becuzz, Robert Harvey, Greg Burghardt, gnat, Jörg W Mittag Apr 28 '18 at 16:31

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions asking for assistance in explaining, writing or debugging code are off-topic here. These can be asked on Stack Overflow if they include the desired behavior, a specific problem or error, and the shortest code necessary to reproduce it in the question (see Minimal, Complete, and Verifiable Example)." – Becuzz, Robert Harvey, Greg Burghardt, gnat, Jörg W Mittag
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 4
  • 4
    A useful property of infinity is that x < infinity for any real x. See answers in linked question. – JETM Apr 26 '18 at 18:54
  • Please, post code. Not pictures of code. This is a site for software engineers, not photographers or painters. We want to copy&paste your code, not critique its use of color and perspective. – Jörg W Mittag Apr 28 '18 at 16:32
  • "I searched extensively and cant figure out what the infinity sign is meant in this pseudocode." – It means "infinity". – Jörg W Mittag Apr 28 '18 at 16:33
8

That line (3) is simply saying initialize the Minimum value to the highest feasible value. In pseudocode that is infinity. If min was UInt32 in real code, then min would be UInt32.Max.

In other words, start off min at a really high value, so when searching iteratively for progressively lower values (by comparing to the previous value), then the first value is something so high that the next value will always become the next min.

Not the answer you're looking for? Browse other questions tagged or ask your own question.