Computer science

Computer science
algorithm

Explain the divide and conquer method in relation to designing algorithms.

Design and develop an algorithm to make a meal of 4 scrambled eggs.
Develop an algorithm to count the number of times the name “Brown” exists in a list of surnames. This list is not
sorted. Brown might exist in the list several times, or it might not be in the list at all.
Instead of considering your age as a number of years, consider the number of days that have passed since birth. One
can easily imagine some iPhone App taking a birth date and the current date to calculate the number of days between
these two dates. For such an application, what would be the:

a) Preconditions before computation commences,
b) Assertions during computation, and
c) Postconditions after computation completes?

NOTE – ignore leap years, and dates before 1900.

a) Using the method of deduction and some Group I rules and Group II equivalences, prove that the destructive
dilemma is valid.

b) Using the method of deduction and some Group I rules and Group II equivalences, prove the following conclusion.

1. A ??B (Premise)
2. ~A ??B (Premise)
3. A v G (Premise)
4. B ??C (Premise)
5. D v (~B v ~C) (Premise)
6. D ??E (Premise)
7. E ??F (Premise) Therefore F v G

READ ALSO :   Uc Application for Transfer Student