You are on page 1of 8

PROBLEM SOLVING

It is widely recognized that Problem-Solving is a creative process which largely defines systematization and mechanization. This may not sound very encouraging to problem solver. To balance this, most people, during their schooling, acquire at least a modest set of problem-solving skills which they may or may not be aware of. Even if one is not naturally skilled at problem-solving, there are a number of steps that can be taken to raise the level of one's performance. It is not implied or intended that the suggestions in that follows are in any way a recipe for problem-solving. The plain fact of the matter is that there is no universal method. Different strategies appear to work for different people. Within this context, where can we begin to say anything useful about computer problem solving? We must start from the premise that computer problem solving is about understanding and applying logic. Success in solving any problem is only possible after we have made the effort to understand the problem at hand. We cannot hope to make useful progress in solving a problem until we fully understand what it is we are trying to solve. This preliminary investigation may be thought of as the problem definition phase. In other words, what we must do during this phase is work out what must be done rather than how to do it. That is, we must try to extract from the problem statement (which is often quite imprecise and maybe even ambiguous) a set of precisely defined tasks. Inexperienced problemsolvers too often gallop ahead with how they are going to solve the problem only to find that they are either solving the wrong problem or they are solving just a very special case of what is actually required. In short, a lot of care should be taken in working out precisely what must be done. To be an effective problem solver, the primary thing that you should try to achieve is to sharpen your logic of identifying and classifying the type of problem that you are facing.

Problems can be classified into different groups, to be more precise they can be divided into four different groups. They are as follows:

a. b. c. d.

Question-based problems Situation-based problems Convincing-based problems Solving-based problems

Question based problem These type of problems involve a question that needs a solution or an answer. Often it is difficult and needs skill and effort to derive the answer as you may not have access to all the relevant data and facts to make a perfect decision. An example: Should the government help people who are retrenched? Obviously this question asks for further data such as how many people have been retrenched? Is it a problem that the government should handle? Why and how should they help them? Question-based problems usually involve a long term plan of action and one which requires you to dig for more information and data to help you find a solution to it. The situation also provides you a chance to dig deeper into the status quo that you are in and to see how you could improve your current state to the ideal state that you desire. If you come across with this type of problem, you need to work towards getting as much facts and data as possible that will allow you to at least try to minimize the problem and make an informed decision.

Situation Based Problem


These types of problems as the word suggest is based on a situation that is currently causing you a confusion. For example, your supervisor has asked you to work through the weekend to finish up a project for the company that is worth a million dollars. But, you've promised to take your family out for dinner to celebrate your spouse's birthday. You now have a 'situation' here. Such situation or problems can sometimes cause you to avoid the problem or try to not give any attention to it. The question now before you is how you are going to handle with this kind of situation. This is when you need to keep thinking of how if at all you could satisfy these two very different situations. Or to decide and prioritize which is important to you. Making up your decision, you need to say your decision to both groups. Situation or condition based problems might expect you to make a choice. By making the choice or choosing one among them, you need to weigh the consequences of your decision and as the saying goes to try to choose "the lesser of the two evil"

Convincing based problem This type of problems put you in a situation whereby you might have information that others don't and a need to convince the others that they should think or perceive things your way. For example, how do you persuade your colleagues that they should not be coming late for their appointments and meetings always? There may be a certain amount of sensitivity in such problems as the status quo that you are in is not an ideal state and might give rise to other problems if you do not handle it well enough. Convincing based problems require you to be empathetic to the others' feelings and to exercise a certain degree of emotional connectivity with others so that they can be convinced.

Solving Based Problem


The last in the category is the solving based problems which basically mean that you have a problem that needs solving. Example: The scan machine has broken down. You have a lot copies to scan . There is only one solution here and that is to solve the problem. The option chosen by you for the solution of this problem can be categorized into either short term, midterm or long term in effect. From the short term perspective, because you've got lots of copies to scan , you might decide to outsource this. As a short-term remedy, you may have to get the scan machine repaired. However this might not guarantee that it won't break down again in which case you might have to think of a long term solution of replacing the whole machine. This category of problems usually will involve you being in a current non-desirous state of being and the need to move to an ideal state of being where the problem is resolved or if that is not possible at least in a state where the problem can be minimized.

Introduction
The Life cycle of problem solving is an iterative approach that involves the following steps

a. Identify the problem


What is the current situation/problem? What is the problem to be solved?

b. Analyze the problem


What data or information we know about the situation/problem? What are our assumptions?

What is the level of knowledge of the person for whom were trying to solve the problem? What can or do they understand? What we do not know yet about the whole situation/problem?

c. Brainstorm ideas

List all possible ideas to solve the problem. No value judgment is to be passed on any suggestions. The more the ideas, the better.

d. Prioritize ideas

Establish the pros and cons of each suggestion in step c. Rank the suggested ideas from step c according to set criteria.

e. List the steps to be taken following the chosen solution (Algorithms)

According to the top solution ranked in step d, what are the steps/instructions that should be taken? According to the knowledge base established in step b, will these steps/instructions be understood?

f. Evaluate/Test the solution


After following the steps in step e, Do we have the desired results? Rank the suggested ideas from step c according to set criteria. Which are few of the areas that are not correct/satisfactory?

1.3 Propositional Logic and Truth Tables


Introduction
The term "logic" came from the Greek word "logos" (which is sometimes translated as "sentence", "discourse", "reason", "rule", and "ratio"). Of course, these translations are not enough to help us understand the meaning of "logic" as it is used today.

So, what is logic? We may give the definition of logic as the study of the principles of correct reasoning. In general, there are two types of logic: Informal and Formal logic. Sometimes, a distinction is made between informal logic and formal logic. The term "informal logic" is often used to mean the same as careful thinking or critical thinking. Often it is used to refer to the study of reasoning and fallacies in the context of everyday life. "Formal Logic" mainly deals with formal systems of logic. These are specially built systems for carrying out evidences, where the languages and rules of reasoning are carefully and precisely defined. Sentential Logic (also known as "Propositional Logic") and Predicate Logic are both examples of formal systems of logic. There are many reasons for studying formal logic. One is that formal logic guides or helps us identify patterns of good reasoning and patterns of bad reasoning, so we can judge and identify which to follow and which to avoid. This is why learning basic formal logic can help improve critical thinking. Linguists use Formal systems of logic to study natural languages. Formal systems of logic are used by Computer scientists in research relating to Artificial Intelligence. Finally, formal logic is also used by many philosophers when dealing with complicated philosophical problems to justify their reasoning more clearly.

Definitions:
Statement (propositions): A statement or proposition, is any declarative sentence which is either true (T) or false (F) but not both. We refer to 'T' or 'F' as the truth value of the statement. The sentence "2+2 = 4" is a statement, since it can be either true or false, and here in our example it is a true statement, and its truth value is T. The sentence "1 = 0" is also a statement, and its truth value is F. "It will rain tomorrow" is not a proposition. We shall have to wait for tomorrow to know its truth value, "Solve the following equation for x" is not a statement, and it cannot be assigned any truth value whatsoever. (It is a command or an imperative, rather than a declarative sentence.) "The number 5" is not a statement or proposition, since it is not making any sense and it is not even a complete sentence. A truth table is a complete list of the possible truth values of a statement. We use "T" to mean "true", and "F" to mean "false" (though it may be clearer and quicker to use "1" and "0" respectively). For example, p is either false or true. So its truth table has 2 rows:

P TRUE False

Simple statements P ~p p is True P is False Assertion Negation

Propositional Logic and Truth Tables


Compounds and connectives
A compound statement is one with two or more simple statements as its parts and each part is termed as a component. A component of a compound statement is any whole statement that is part of a larger statement; components may themselves be compounds. The operation on two logical values, is termed as Logical conjunction. Typically, the values of two statements produces a value of true if and only if both of its operands are true. Symbolic representation: p q

T T F F

T F T F

T F F F

Logical disjunction is also an operation on two logical values. Typically the values of two statements, produces a value of false if and only if both of its operands are false. In general a disjunction is a logical formula that can have one or more literals separated only by ORs. A single literal is often considered to be a degenerate disjunction. Symbolic representation: p V q

T F T F

T T F F

T T T F

1.3 Propositional Logic and Truth Tables


Compounds and connectives
Logical Implication is an operation, where for two propositions p and q, the implication or conditional statement p -> q is false when p is true and q is false, and is true otherwise. p is called the hypothesis or premise and q is called the conclusion. Symbolic representation: p -> q

Logical bi-conditional is an operation, where for two propositions p and q, the biconditional statement p <-> q is true when either both p and q are true or false, and is false otherwise. Symbolic representation: p <-> q

Note:
If a compound statement has n distinct simple components, then it will have 2n rows in its truth table.

1.3 Propositional Logic and Truth Tables


Contingencies, Tautologies and Contradictions
If the compound statement has a combination of T's and F's in its truth table columns, it is called a contingency. The statements that have only T's are called tautologies. If all the truth values are F then they are called contradictions. In the conditional, p -> q, the first statement or "if- clause" (here p) is called the antecedent and the second statement or "then-clause" (here q) is called the consequent. Of course, in more complicated conditionals, the consequent and antecedent could be compounds rather than (as here) simple statements. Any argument can be expressed as a compound statement in the following way. Take all the premises, conjoin them, and make that conjunction the antecedent of a conditional; make the conclusion the consequent. This implication statement is called the corresponding conditional of the argument. Every argument has a corresponding conditional, and every implication statement has a corresponding argument. Note that because the corresponding conditional of an argument is a statement, it is a tautology, a contradiction, or a contingency.

An argument is valid if and only if its corresponding conditional is a tautology. The validity of the statements can be confirmed by using other tests like truth tables. The main alternative test searches for a counter example or invalidating row: a possible universe (substitution instance) in which all the premises are true and the conclusion is false. If there are no counter examples, the argument is valid; if there is even one, it is invalid. Two statements are consistent if and only if their conjunction is not a contradiction. Two statements are logically equivalent if and only if their truth table columns are identical, if and only if the statement of their equivalence using "<->" is a tautology. Obviously truth tables are adequate to test validity, tautology, contradiction, contingency, consistency, and equivalence. This is important because truth tables require no ingenuity or insight, just patience and the mechanical application of rules. Truth tables that are accurately constructed will always give us the right answer.

ALGORITHMS

In the introduction, we have given an informal definition of an algorithm as "a set of instructions for solving a problem" and we illustrated this definition with instructions for filling petrol in a car and giving directions to a friend's house. Though we can understand these simple algorithms, they may be very ambiguous for a computer. For an algorithm to be applicable to a computer, it must have certain characteristics. We will state these characteristics in our formal definition of an algorithm. An algorithm is a well-ordered sequence of unambiguous and effectively computable instructions that when executed produces a result and halts in a finite amount of time With the above definition, we can list five important characteristics of algorithms. a. b. c. d. e. Algorithms are well-ordered Algorithms have unambiguous instructions Algorithms have effectively computable instructions Algorithms produce a result Algorithms halt in a finite amount of time The above five characteristics need a little more explanation, so we will look at each one in detail.