The parent who had custody of the child for the greater part of the year is generally treated as the parent who provided over one-half of the child’s support and will claim the exemption if other tests are met. Custody is usually determined by the divorce, separate maintenance or custody decree or agreement. If no decree or agreement establishes custody, then the parent who had physical custody for the greater part of the year is entitled to the exemption