Question: P3.1.8 (uses Java) Using the Least Number Axiom of Excursion 1.2, prove carefully that the factor method given in the text correctly factors any natural.
P3.1.8 (uses Java) Using the Least Number Axiom of Excursion 1.2, prove carefully that the factor method given in the text correctly factors any natural. (Hint: Assume that n is the small-est number that it doesnt factor correctly, trace the method with input n, and derive a contradiction.)

public void factor (natural x) { // prints sequence of prime factors of x, one per line // special cases: outputs empty sequence if x is 0 or 1 if (x = x) d = x;} System.out.println(); factor (x/a);} public void factor (natural x) { // prints sequence of prime factors of x, one per line // special cases: outputs empty sequence if x is 0 or 1 if (x = x) d = x;} System.out.println(); factor (x/a);}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
