When my prof introduced us to the N/NP topics, the first thing he mentioned is input size, which he defines as the number of bytes needed to describe and write a problem's input into a file. Could someone please explain to my why the input size matters to these topics? Thank you.
EDIT: I'm concerned about why this way of measuring size is important, esp. to this P/NP topic. My prof mentioned the pseudo-polynomial running time (of the knapsack problem) which is somewhat relevant to this way of counting input size. I'm not sure how it is connected to the NP picture, mostly because right after redefining input size, he went into reduction examples and there is no mentioning of input size since. And for NP-hard problems, since there is no known way to solve them efficiently, why should we care about input anyway?
The simplistic is answer is that complexity classes are defined in terms of the size of the input (of course there are other ways, via descriptive complexity and so on, but I'll stick to the basics). So introducing the size of the input is essential to defining the classes.
Naturally the question then becomes why define these things in terms of the size of the input? The whole raison d'être for these classes is to work out how much of a resource we need to expend to solve a problem. Perhaps we're interested in how much time it takes, or how much space, or some other resource, but above all we want to know what's possible and how much it'll cost us. Like the other comments and answer have said, it's pretty reasonable to expect that giving a bigger input will consume more of the resource we're interested in. Moreover, it's kind of uninteresting to see how much time/space/etc. it takes to solve a single instance - what we want is a classification that tells us how much we need to expend to solve any possible instance, without just trying it and seeing (imagine checking how long it took to solve a particularly hard instance of a particularly hard problem and finding out it took 10 years, or worse, the lifetime of the universe).
So then of course we need some way of relating the instance to the amount of resources needed to solve it. The first natural measure is the size of the instance - if you give me a bigger instance, it takes more time/space/etc.