Subject to the provisions of paragraph (2) of this subsection, the amount of the educational assistance allowance paid to an eligible veteran who is pursuing a program of education under this chapter while incarcerated in a Federal, State, local, or other penal institution or correctional facility for conviction of a felony may not exceed such amount as the Secretary determines, in accordance with regulations which the Secretary shall prescribe, is necessary to cover the cost of established charges for tuition and fees required of similarly circumstanced nonveterans enrolled in the same program and to cover the cost of necessary supplies, books, and equipment, or the applicable monthly educational assistance allowance prescribed for a veteran with no dependents in subsection (a)(1) or (c)(2) of this section or
section 3687(b)(1) of this title, whichever is the lesser. The amount of the educational assistance allowance payable to a veteran while so incarcerated shall be reduced to the extent that the tuition and fees of the veteran for any course are paid under any Federal program (other than a program administered by the Secretary) or under any State or local program.