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.
Comments