Please bear with me on this one. I am first going to describe an example from the book, and then ask my question at the end.
According to the text on Programming Language Paradigms:
Inductive specification is a powerful method of specifying a set of values. To illustrate this method, we use it to describe a certain subset S of the natural numbers N = {0, 1, 2, . . .}.
Top-down definition:
A natural number n is in S if and only if
- n = 0, or
- n −3 ∈ S.
We know that 0 ∈ S. Therefore 3 ∈ S, since (3 − 3) = 0 and 0 ∈ S. Similarly 6 ∈ S, since (6−3) = 3 and 3 ∈ S. Continuing in this way, we can conclude that all multiples of 3 are in S.
What about other natural numbers? Is 1 ∈ S? We know that 1 != 0, so the first condition is not satisfied. Furthermore, (1−3) = −2, which is not a natural number and thus is not a member of S. Therefore the second condition is not satisfied.
Bottom-up definition:
Define the set S to be the smallest set contained in N and satisfying the following two properties:
- 0 ∈ S, and
- if n ∈ S, then n +3 ∈ S.
A “smallest set” is the one that satisfies properties 1 and 2 and that is a subset of any other set satisfying properties 1 and 2. It is easy to see that there can be only one such set: if S1 and S2 both satisfy properties 1 and 2, and both are smallest, then S1 ⊆ S2 (since S1 is smallest), and S2 ⊆ S1 (since S2 is smallest), hence S1 = S2. We need this extra condition, because otherwise there are many sets that satisfy the remaining two conditions
Rules of Inference:
_____
0 ∈ S
n ∈ S
---------
(n+3) ∈ S
This is simply a shorthand notation for the preceding version of the definition. Each entry is called a rule of inference, or just a rule; the horizontal line is read as an “if-then.” The part above the line is called the hypothesis or the antecedent; the part below the line is called the conclusion or the consequent. When there are two or more hypotheses listed, they are connected by an implicit “and”
Now here comes the questions.
- Probably the most important question is why do I need to know these inductive definitions, and how are they useful in the real-world case?
- Why does Google return almost no results on Inductive Definition?
- If top-down, bottom-up and rules of inference essentially display the same thing, why do we need 3 ways of writing the same thing?
- Why is it so hard for me to find the inductive definitions on problems a little more complicated than the book's example, such as the following.
I want to find the top-down, bottom-up, and inferece definitions for the 2 problems below. You don't have to give me the answer, but I do want to know how do I go about deriving the inductive definition. Where do I start? Is there a systematic approach to it (a recipe) for doing these type of problems?
1. {2n+3m +1 | n,m ∈ N}
2. {(n, 2n+1) | n ∈ N}