Let R be a ring, S a partial groupoid (magma), and let \(\{R_s\}_{s\in S}\) be a family of additive subgroups of R. Then R is said to be (a strongly) S-graded ring inducing S if \(R=\bigoplus _{s\in S}R_s\) and: i) \(R_s R_t\subseteq R_{st}\) \((R_s R_t=R_{st})\) whenever st is defined; ii) \(R_s R_t\ne 0\) implies the product st is defined. The class of S-graded rings inducing S encompasses all the classes of graded rings. R is said to be pseudo-unitary if, moreover: iii) S is cancellative; iv) for every idempotent element \(e\in S\) the ring \(R_e\) is with unity \(1_e;\) v) for every homogeneous element \(x\in R,\) that is, \(x\in \bigcup _{s\in S}R_s,\) there exist idempotent elements e, \(f\in S\) such that \(1_ex=x=x1_f.\) We give a partial answer to a certain Bergman-type question raised by Andrei Kelarev, by answering it in the affirmative for the class of all pseudo-unitary strongly S-graded rings inducing S, with commutative S, and apply the obtained result to address another problem recorded in [Abawajy, J., Kelarev, A., Chowdhury, M.: Power Graphs: A Survey. Electron. J. Graph Theory Appl. 1(2), 125–147 (2013)], related to the connectedness of the power graph of the multiplicative semigroup of all homogeneous elements of a graded algebra over a field of characteristic zero.