You are on page 1of 60

TLDR: First and Last Options are the correct answer.

2,5,8,11,14,17,20,23,26,29
1,1,1,2,2,2,3,3,3,4
1, 4, 27, 256
P(x): x < x2
Correct answer is 4.
> A-B = {1,2,4,5}
> A U B = {1,2,3,4,5,6}
> B-A ={0,6}
> A ∩ B = {3}
The last choice is the answer. U = 1 2 3 4 5 6 7 8 9 10
001011000 0
TLDR: A n
The following are the definitions for different characteristics:

● Input - If a procedure has input values.


● Output - If a procedure provides output for every input.
● Definiteness - If a procedure, all the steps are clearly and precisely defined.
● Finiteness - If a procedure has a fixed/finite number of opertions/steps to be
performed for every input.
● Effectiveness - If in a procedure, it is possible to perform every operation/step in this
algorithm in a fixed time.
● Generality - If a procedure is applicable and can be implemented for all the problems
of the same type.

Now, here are your answers:

1) The procedure has the characteristics of: Input, Definiteness

The procedure lacks: Output, Correctness, Finiteness, Effectiveness, Generality

Explanation:

● Since the procedure has an input value 'n', hence, it has Input.
● Also, the steps are clearly and precisely defined in this procedure, it has Definiteness.

2) The procedure has the characteristics of: Input, Definiteness, Finiteness

The procedure lacks: Output, Correctness, Effectiveness, Generality

Explanation:

● Since the procedure has an input value 'n', hence, it has Input.
● The steps are clearly and precisely defined in this procedure, it has Definiteness.
● Also, we can see that the algorithm stops when the input value 'n' becomes less than
0 (means it becomes negative) and it is clear that eventually 'n' will become negative
because n is decreasing by 1 in every iteration causing the procedure to stop. Hence,
it has finiteness.

3) The procedure has the characteristics of: Input, Definiteness, Finiteness

The procedure lacks: Output, Correctness, Effectiveness, Generality

Explanation:

● Since the procedure has an input value 'n', hence, it has Input.
● The steps are clearly and precisely defined in this procedure, it has Definiteness.
● Also, since the procedure does not perform the while loop (because i is not defined),
and it only performs the step sum = sum+i; hence it has Finiteness.

4) The procedure has the characteristics of: Input, Finiteness, Generality


The procedure lacks: Output, Definiteness, Correctness, Effectiveness

Explanation:

● Since the procedure has input values 'a' and 'b', hence, it has Input.
● The procedure does not have any idea about how to perform the operation x:= either
a or b, so, this procedure won't perform any steps. Hence, it has Finiteness.
● Also, since this procedure can be applied and generalized for all the real numbers,
hence it has Generality.

You might also like