Python sets, frozensets, and literals
Python sets, frozensets, and literals
Posted Jan 21, 2022 17:29 UTC (Fri) by nybble41 (subscriber, #55106)In reply to: Python sets, frozensets, and literals by jwarnica
Parent article: Python sets, frozensets, and literals
The general approximation for treating finite computers as equivalent to Turing machines is that while any given computer may have finite memory you can always add more if an algorithm requires it for some particular input. Even if that might require multiple levels of indirection due to e.g. the address space limits of the CPU. Of course, for physical computers at some point you run into the physical limits of computation (information density limited by thermodynamics; Bremermann's limit on computational speed), but this is with respect to an idealized model of computation where e.g. your computer architecture (ALU and currently installed memory) may be finite but there is no predetermined restriction on how long you're willing to wait for the result.
Also, it doesn't really matter that your memory is limited when analyzing *time* complexity, provided the algorithm has constant *space* complexity and can stream the input and output.