“What really interests me,” Albert Einstein once remarked, “is whether God had any choice in the creation of the world.” Einstein was wondering if the world and its physical laws are arbitrary or if they are somehow inevitable. To put it another way: Could the universe possibly be any different than it is?
… Einstein’s statement draws a variety of reactions. One’s feelings about the nature or reality of God are largely immaterial. The issue is whether there can be “prior” constraints even on the creation of the world.
One reaction is that there are no constraints. By definition, an all-powerful God can create the world any way He chooses. Everything about the universe is God’s choice. Creation was not limited, not even by logic. God created logic.
On the other hand, it can be argued that even God is bound by logic. If God can lift any weight, then he is expressly prevented from being able to lift a weight so heavy that He cannot lift it. But God can do anything that does not involve a logical contradiction.
(From Chapter 1 of “The Recursive Universe” by William Poundstone)