For the word problem below, there are 4 variables to solve for, but I can only identify 3 equations given the data. Through trial and error, you can easily figure out the answer, but I am wondering if there is an implied equation I'm not seeing. In other words, how can this problem be solved using algebra rather than a bit of trial and error?
Ian has been saving money for his summer trip to his grandparents' house. He has saved 18 bills of varying denominations, including \$20s, \$10s, \$5s, \$1s. He's saved a total of \$126. He has the same number of \$10s as he has \$1s. How many of each bill does Ian have?
w + x + y + z = 18 w + 5x + 10y + 20z = 126 w = y [legend // w: number $1s, x: number of $5s, y: number of $10s, z: number of $20s]
$1s: 6 $5s: 4 $10s: 6 $20s: 2