Section 6. If a child resides temporarily in a town other than the legal residence of his parent or guardian for the special purpose of their attending school, the child may attend school with the authorization of the school committee of said town, and the said town may recover tuition from the parent or guardian, unless under section twelve of chapter seventy-six, such tuition is payable by a town. Tuition payable by the parent or guardian shall, for the period of attendance, be computed at the regular rate established by the school committee for non-resident pupils, but in no case exceeding the average expense per pupil in such school for said period. The school committee of the town in which a child is temporarily residing for the special purpose of their attending school may waive all or part of the tuition charge for such child.