Referring to the time in about 5 billion years when the Sun is supposed to expand into a red giant and engulf Mercury and Venus and possibly Earth (the expansion would probably make Earth uninhabitable in less than 1 billion years) - It's entirely possible that there may not even be a red giant phase for the Sun. This relies on entropy being looked at from another angle - with the apparent randomness in quantum and cosmic processes obeying Chaos theory, in which there's a hidden order behind apparent randomness. Expansion to a Red Giant (and so much else) could then be described with the Information Theory vital to the Internet, mathematics, deep space, etc. In information theory, entropy is defined as a logarithmic measure of the rate of transfer of information. This definition introduces a hidden exactness, removing superficial probability. It suggests it's possible for information to be transmitted to objects, processes, or systems and restore them to a previous state - like refreshing (reloading) a computer screen. Potentially, the Sun could be prevented from becoming a red giant and returned to a previous state in a billion years (or far less) - and repeatedly every few billion years - so Earth could remain habitable permanently.