— In an action for a judgment declaring Social Services Law § 131-c (2) unconstitutional, the plaintiffs appeal from an order and judgment of the Supreme Court, Queens County (Lonschein, J.), dated March 29, 1989, which granted the motion of the defendants to dismiss the complaint and denied their cross motion, inter alia, for class action certification.
Ordered that the order and judgment is modified, on the law, by adding a provision thereto declaring that Social Services Law § 131-c (2) is not violative of either the New York State nor Federal Constitutions; as so modified, the order and judgment is affirmed, without costs or disbursements.
The plaintiffs allege that Social Services Law § 131-c (2) is unconstitutional because it violates the Equal Protection Clauses of the Federal and State Constitutions and New York Constitution, article XVII, § 1 which requires the Legislature to provide for the needy. We disagree.
The challenged provision was enacted in 1985 and subsequently amended in 1986 to conform to the Deficit Reduction Act of 1984 (42 USC § 602 [a] [39]). The amendments to the Federal law affected the Aid to Dependent Children program (hereinafter AFDC). The amended Federal legislation required all States participating in an AFDC program to alter eligibility requirements.
Social Services Law § 131-c (2) which applies to the Home Relief category of public assistance as well as to AFDC, mandates that the income of a child’s grandparent must be considered in determining the child’s eligibility for public assistance benefits if the child’s parent is under the age of 18 and both reside in the same household as the grandparent.
Generally, an Equal Protection challenge to classifications in the Social Services Law should be directed to the issue of *915whether there is a rational basis for the classification (see, Matter of Davis, 57 NY2d 382). In the area of economics and social welfare, a State does not violate the Equal Protection Clause merely because the classifications made by law are imperfect. Rather, if "the classification has some ’reasonable basis’, it does not offend the Constitution [merely] because the classification ’[was] not made with mathematical nicety or because in practice it results in some inequality’ ” (Dandridge v Williams, 397 US 471, 485, quoting Lindsley v Natural Carbonic Gas Co., 220 US 61, 78; Board of Educ. v Nyquist, 57 NY2d 27; Alevy v Downstate Med. Center, 39 NY2d 326, 332). Since the members of the class of children affected by the challenged provision do in many cases have access to a source of income not available to those children outside the class, the provision is rationally related to the legitimate government interest of allocating limited resources in a way that optimally assists the most needy (see, Matter of Bernstein v Toia, 43 NY2d 437).
While it is true that the State is compelled by the Federal Deficit Reduction Act to apply the provision only to AFDC cases, the decision on the part of the State Legislature to apply it as well to the Home Relief category of public assistance is also a rational one. As noted in the memorandum of the State Executive Department in support of the bill, if the Deficit Reduction Act were not extended to the Home Relief programs, Home Relief benefits would in certain circumstances be higher than those provided under AFDC, which ultimately could result "in the complete erosion of the AFDC” programs (see, 1985 McKinney’s Session Laws of NY, at 2953).
The plaintiffs further argue that the subject legislation violates NY Constitution, article XVII, § 1 which requires the State to provide for the needy. However, the constitutional provision mandates only that the State provide for ”[t]he aid, care and support of the needy * * * in such manner and by such means, as the legislature may from time to time determine” (NY Const, art XVII, § 1). Here the Legislature has made its determination with regard to need and the determination may not be judicially disturbed or questioned (see, Matter of Capozzi v New York State Dept. of Social Servs., 137 Misc 2d 193). We note that the plaintiffs’ reliance on Tucker v Toia (43 NY2d 1, 8) is misplaced. The legislation in issue there imposed an additional eligibility requirement on those applicants already conceded to be needy.
We also reject the plaintiffs’ claim that their motion for certification as a class action was improperly denied. Class *916action certification is unnecessary and inappropriate where government operations are involved and any relief granted to the plaintiffs would adequately protect others similarly situated under the principles of stare decisis (see, Matter of Bey v Hentel, 36 NY2d 747, 749; Ughetto v Acrish, 130 AD2d 12).
We have reviewed the plaintiffs’ remaining contention and conclude that it is without merit.
Finally, we note that, although the Supreme Court properly determined that Social Services Law § 131-c (2) was not violative of the New York State or Federal Constitutions, it erred in failing to make a declaration to that effect (see, Lanza v Wagner, 11 NY2d 317, 334, appeal dismissed, 371 US 74, cert denied 371 US 901). The order and judgment appealed from has been modified accordingly. Harwood, J. P., Balletta, Miller and O’Brien, JJ., concur. [See, 142 Misc 2d 605.]