Which of the following gives the correct relation between the acceleration due to gravity and period of a pendulum?