• Question: Is it possible to create an algorithm with infinite possibilities?

    Asked by Sophie on 7 Jan 2020.
    • Photo: Christina Pagel

      Christina Pagel answered on 7 Jan 2020:


      Not sure what you mean by infinite possibilities? Do you mean an algorithm that will keep going infinitely? That is quite easy (if not very helpful cos it will break your computer).

      e.g.

      Set j=1
      Do until j=0
      j=j+1
      Loop

      This will just keep adding 1 to the value of j, starting with j=1. I’ve set the loop to only stop if j=0 and it never will, so the algorithm will keep going forever.

      An algorithm is really just a computer programme – a set of instructions to follow.

    • Photo: Maja Popovic

      Maja Popovic answered on 8 Jan 2020:


      Do you mean one single algorithm which can perform any task?
      No, I don’t think it is possible.

Comments