Without looking at specifics, growing a tree using information gain is a greedy procedure and won't always get you to the smallest tree consistent with the data, even if one exists. If there are ties among attributes, you break them arbitrarily. If you have all attributes with information gain 0, then they should all take on the same value for all examples and building a consistent tree shouldn't be possible. This should be easy to check by trying both of the two decision trees and seeing neither works.