As the definite article, "the" indicates an exact example of the noun it modifies.
Did you pet the dog?
Did you pet a dog?
In the first example, there is a specific dog that is the object. In the second, it could be any dog.
The carpenter repaired the legs of the tables.
The carpenter repaired legs of the tables.
This one is a little more tricky, but the same rule applies.
First, the tables means that there are a specific set of tables being discussed.
In the first sentence, the legs means that he/she repaired:
- All of the legs of all of the tables
- OR, all of the legs of all of the tables that required repair.
In the second sentence, this is ambiguous. The carpenter definitely repaired some of the legs. Because it is plural, they repaired more than one leg. However, whether it was all of the (repairable) legs or not, we cannot say.
Many good students will buy that book.
In this sentence, many operates as a determiner*. It describes good students. However, its meaning is ambiguous in the following areas:
- Possibly, not all students are good students. Students who are not good are not considered - they may or may not buy the book, but are not part of the set the sentence is discussing.
- Probably, not all good students will buy that book. Otherwise, the sentence would say "All good students will buy that book."
- "Many good students" are not a specific set.
That said, if you intend the third meaning you could say "The many good students will buy that book." But this has a different meaning:
All of the [many [good students]] will buy that book.
In other words:
- There are good students.
- There are many good students.
- All members of this set will buy the book.
* A determiner or quantifier (link courtesy of choster) is a word that describes a noun or noun clause, telling us whether it is specific or general. The definite article ("the") is a determiner, as are indefinite articles and many other words that describe the specificity of the noun.