If we're given a computer program, how can I prove that there is a greater number of points in the domain than the number of paths? The question I am asked is "Which is larger? The number of paths in a program or the number of points in its domain?"
This is what I have so far, but I feel I'm not expressing my thoughts properly: "A domain has to have at least one path, but a domain can have more than one path or more than one domain. There can be more domains than paths, if each domain uses a path that routes through the same routine or, in other words, through a loop. Otherwise, there would be more points than paths in a domain."
Just got a response back from him: "If there is a loop in the program, the same sequence of nodes in the graph may be visited numerous times. The number of points in the domain has nothing to do with the number of nodes in the program graph. It has to do with the values of the inputs to the program that drive it through the paths.
In your diagram, there are five ways to get from the top of the loop to the bottom. Each path executes a distinct sequence of functions. When there is a loop back, the sequence of functions that is executed by the program gets longer. If you think about all of the different sequences of functions that could be executed in the program through repeated looping, this is a big number, as you have correctly shown.
The domain refers to a set of data values that are inputs to the program. When you run the program, you present it with a collection of inputs. The program processes these inputs and produces outputs. You are correct to model the entire program as a mathematical function. This is why the inputs are called the domain (as in domain and range of a function in set theory). Each point in the domain represents a different distinct collection of input values. The entire set of different collections of inputs is the domain of the funtion. Each unique collection of inputs (i.e., each point in the domain) maps to some particular collection of outputs (or point in the range). The number of points in the domain is a big number.
The flow graph of the program has nothing to do with the domain or range.
So the question is this: if you count the number of different unique collections of inputs (i.e, the cardinality of the domain), is this bigger or smaller than the number of distinct paths through the program? We are comparing very large numbers to very large numbers. But one of them is clearly bigger, and it can be proved."