Class 12 · Chapter 2
115 questions with model answers.
Answer
From the book: "Computational thinking is a way of thinking to solve problems clearly and logically. It helps us break big problems into smaller and simpler parts." "Computational thinking means thinking like a problem solver. It focuses on understanding a problem step by step."
Answer
From the book: "It helps us break big problems into smaller and simpler parts." We look for patterns, remove unnecessary details and "create clear steps to solve the problem. These steps can be followed by humans or computers. Computational thinking helps us think logically and clearly." Topic 2.2 (page 21) adds: "It helps reduce mistakes and confusion. Computational thinking improves overall problem-solving ability."
Answer
From the book: "We break a big problem into smaller parts. We look for patterns in problems and solutions. We remove unnecessary details and focus on important points. We then create clear steps to solve the problem."
Answer
From Figure 2.1 (page 21): "1. Decomposition" (Break Down the Problem), "2. Pattern Recognition" (Find Patterns), "3. Abstraction" (Focus on What's Important) and "4. Algorithm Design" (Create Step-by-Step Solution).
Answer
Any three of these, from the book: "Making a daily timetable is an example of computational thinking. Cooking a recipe uses step-by-step instructions. Planning a trip includes breaking tasks into smaller parts. Sorting books by subject or size shows pattern recognition. Fixing a mobile phone problem uses logical thinking. Managing money needs planning and decision making. Playing strategy games requires thinking ahead."
Answer
No. From the book: "This thinking is not only for computer science students." TIDBIT: "Computational thinking is used by scientists, engineers, and even chefs when planning complex tasks."
Answer
From the book: "Breaking a problem into smaller parts is called decomposition. A big problem can be difficult to solve at once. Smaller parts are easier to understand and manage. Each part can be solved step by step."
Answer
From the book: "Creating step-by-step solutions helps us solve problems in an organized way. These steps are known as algorithms. Each step should be clear and simple to follow. The steps must be in the correct order." Chapter Summary (page 30): "An algorithm is a step-by-step set of instructions used to solve a problem or perform a task."
Answer
From the book: "Identifying a problem clearly is the first and most important step in problem solving." "A clear problem leads to a correct solution. This step helps save time and effort. Clear thinking makes problem solving easier."
Answer
From the book: "We must understand what the problem is asking. It is important to know the given information and the expected result. Asking simple questions helps in understanding the problem better. Unnecessary details should be ignored."
Answer
From the book: "Smaller parts are easier to understand and manage. Each part can be solved step by step. This reduces confusion and stress. Decomposition helps us organize our thoughts. It allows us to focus on one task at a time."
Answer
From Figure 2.2 (page 22): Start, Boil Water, Steep Tea, Add Milk or Lemon, Serve Tea, End. The book says: "Computers also follow step-by-step instructions (as shown in Figure 2.2)."
Answer
From the book: "After finding a solution, it is important to evaluate it. Evaluation helps us check if the solution is correct. It allows us to find and fix mistakes. Testing the solution shows whether it works properly."
Answer
From the book: "We can improve the solution by making it simpler or faster. This process helps us learn from errors. Improving solutions leads to better performance."
Answer
From the book: "In computer science, logic means using rules to make correct decisions. Logic helps computers understand true and false conditions. It allows systems to process information correctly." "Logical statements are used in programs and algorithms. These statements help control the flow of programs."
Answer
From the book: "Logic is the science of true reasoning and is an important concept in computer science. It helps computers store, understand, and use information correctly." The chapter Summary (page 30) also says: "Logic is a formal method of representing facts, statements, and rules so that correct reasoning and decision-making can be performed."
Answer
Because logic is used to store and represent information. From the book: "It helps computers store, understand, and use information correctly. Using logic, complex information can be represented in a simple way."
Answer
From the book: "Logical statements are used in programs and algorithms. These statements help control the flow of programs. Logic is the basis of many computer operations. It helps computers think in a structured way."
Answer
From the book: "It helps computers and humans draw correct conclusions. Using logic, decisions are made based on facts and rules. It removes confusion and guesswork. Logical reasoning helps solve problems step by step." "Logic ensures that decisions are consistent and accurate."
Answer
From the book: "It is used in expert systems and artificial intelligence."
Answer
From the book's TIDBIT: "Logic gives computers a way to "think" about facts and make decisions, almost like a brain." The topic text adds: "Computers use logic to choose the correct action."
Answer
From the book: "A proposition is a statement that is either true or false. It cannot be both true and false at the same time." For example, "The sun rises in the east" is a proposition.
Answer
From the book: "Propositional logic is a basic form of logic used in computer science. It deals with statements that can be true or false. These statements are called propositions."
Answer
No. From the book: "Questions and commands are not propositions." A proposition "is a statement that is either true or false". The book's example: "The sun rises in the east" is a proposition.
Answer
From the book: "A proposition is usually represented by a capital letter, such as P, Q, or R." For example, for the statement "The sky is blue" we write: P = "The sky is blue".
Answer
From the book: "A simple proposition contains only one statement. It cannot be broken into smaller parts. For example, "It is raining" is a simple proposition. A compound proposition is formed by combining two or more simple propositions. Logical connectives are used to join them. For example, "It is raining and it is cold" is a compound proposition."
Answer
From the book: "Logical connectives are words used to connect propositions." The book names three: AND, OR, NOT. "These connectives help form compound propositions."
Answer
From the book: "AND is used when both statements must be true. OR is used when at least one statement is true. NOT is used to reverse the truth of a statement." Figure 2.4 says: A and B is "True if both A and B are true.", A or B is "True if A or B is true (or both).", Not A is "True if A is false."
Answer
A truth value is the value True or False that a proposition takes. From the book: "Each proposition P or Q can take the value True (T) or False (F)." "Truth value of a compound proposition is determined by the values of its components."
Answer
From the book: "Truth tables are used in logic to show the truth values of statements." "A truth table lists all possible combinations of truth values. It shows the final result for each combination." The chapter Summary (page 30) says: "A truth table is a table used to show the truth values of a logical expression for all possible combinations of its inputs."
Answer
From the book: "The main purpose of truth tables is to show how a logical expression behaves. They help us find when a statement is true or false. Truth tables list all possible input values. They help remove confusion in logical reasoning."
Answer
From the book: "Creating a truth table starts with identifying the propositions. Each proposition is given a truth value of true or false. All possible combinations of truth values are listed. Logical connectives are applied step by step. The final result is written for each row."
Answer
From the book: "Truth tables enumerate all possible combinations (2ⁿ rows for n propositions)." For two propositions, 2² = 4 rows, as in Figure 2.5.
Answer
From Figure 2.5: Truth Table for Logical Expressions (A AND B is True only when both A and B are True):
| A | B | A AND B |
|---|---|---|
| True | True | True |
| True | False | False |
| False | True | False |
| False | False | False |
Answer
From the book: "Truth value of a compound proposition is determined by the values of its components." In a truth table, "Logical connectives are applied step by step. The final result is written for each row."
Answer
From the book: "Propositional equivalence is a concept in propositional logic. It explains when two logical expressions have the same meaning. Even if expressions look different, they may give the same result."
Answer
From the book: "If two expressions have the same truth values in all cases, they are equivalent. The symbol "≡" is used to show equivalence."
Answer
From the book: "Equivalent logical expressions are identified using truth tables. Each expression is tested for all possible truth values. If the results match in every case, they are equivalent. Logical laws can also help identify equivalence."
Answer
From the book: "Equivalence is important because it helps simplify logic problems. It allows us to replace complex expressions with simpler ones. This saves time and effort." It also "helps avoid logical errors" and "ensures correct reasoning and decisions."
Answer
From the book: "In programming, equivalent expressions improve code efficiency. Equivalence helps avoid logical errors."
Answer
Expression 1 is "(A AND NOT B) OR (B AND NOT A)" and Expression 2 is "(A OR B) AND (NOT A OR NOT B)". From the figure: "Both expressions are true in the same cases (XOR)." Its truth table shows both are T when A = F, B = T and when A = T, B = F, and F in the other two rows.
Answer
From the book: "Logical laws can also help identify equivalence. These laws simplify expressions. Identifying equivalence helps reduce complex expressions."
Answer
From the book: "Propositional satisfiability is a concept in logic that checks whether a statement can be true. It helps us know if a logical expression has at least one situation where it is true."
Answer
From the book: "A proposition is satisfiable if there is at least one combination of truth values that makes it true. If all possible combinations make it false, it is unsatisfiable."
Answer
From the book: "Satisfiability depends on the structure of the expression and the logical connectives used. Logical connectives like AND, OR, and NOT determine whether a statement can be true."
Answer
From the book: "Checking all possible cases using a truth table is one way to test satisfiability. A proposition with at least one "true" outcome is satisfiable."
Answer
From the book: "An example of a satisfiable expression is "P OR Q." This is true if either P or Q is true. Another example is "P AND Q," which is true when both P and Q are true."
Answer
From the book: "An unsatisfiable expression is "P AND NOT P." This is never true because P cannot be both true and false."
Answer
Yes. From the book: "Result: Bring pizza, no soda = satisfiable expression. Solution exists." Bringing pizza and no soda is one way to make the statement true, and at least one way is enough.
Answer
From the book: "This concept is widely used in computer science, especially in problem solving and programming. Satisfiability helps us test logical statements and make decisions. It is important for designing algorithms and verifying programs."
Answer
From the book: "A predicate is a statement that can be true or false depending on the values of the variables. For example, "x is greater than 5" is a predicate because it depends on x." Also: "Predicates describe properties or relationships of objects."
Answer
From the book: "Predicate logic is an extension of propositional logic. It allows us to express more detailed statements about objects and their properties. In predicate logic, we can talk about individuals, groups, and relationships between them."
Answer
From the book: "Propositional logic deals with simple statements that are either true or false. It cannot describe properties of objects or relationships between them. Predicate logic, on the other hand, uses predicates and variables to express detailed statements." Also: "Predicate logic is more expressive and powerful than propositional logic. Propositional logic is easier to understand but less flexible."
Answer
From the book: "Variables represent objects or values in the domain of discourse. Using variables, we can write general statements like "For all x, x > 0.""
Answer
From the book: "Predicates describe properties or relationships of objects. For example, "isEven(x)" is true if x is an even number." Its truth depends on the value of the variable x.
Answer
From the book: Propositional Logic, A = "Ali is Tall": "Cannot see inside (A)", "Limited". Predicate Logic, Tall(Ali): "Can see subject Ali + property Tall", "Much more expressive".
Answer
It shows a box "Predicate" holding "Helps", with arrows to two "Variable" boxes holding x and y, and the label "Helps (x, y)". The book says: "In predicate logic, we can talk about individuals, groups, and relationships between them (as shown in Figure 2.7)." "Predicates and variables together form predicate logic expressions."
Answer
From the book: "Quantifiers are used in predicate logic to describe how many objects satisfy a condition. They help us make general statements or statements about specific objects." The chapter Summary says: "A quantifier is used in predicate logic to show how many objects a statement applies to, such as for all or there exists."
Answer
From the book: "The universal quantifier is used to indicate that a statement is true for all objects in a given set (as shown in Figure 2.8). It is denoted by the symbol "∀". For example, "∀x, x > 0" means "For all x, x is greater than 0.""
Answer
From the book: "The existential quantifier is used to indicate that a statement is true for at least one object in a set (as shown in Figure 2.8). It is denoted by the symbol "∃". For example, "∃x, x is even" means "There exists at least one x that is even.""
Answer
From the book: ""∀x, P(x)" means the predicate P(x) is true for all x, while "∃x, P(x)" means P(x) is true for at least one x." Figure 2.8 reads them as "For all x, P(x)" and "For some x, P(x)".
Answer
From the book: "Quantifiers can also be used together in complex statements. For instance, "∀x ∃y, x < y" means for every x there exists a y that is greater than x."
Answer
From the book: "Quantifiers make predicate logic more powerful than propositional logic. Using quantifiers, we can write statements like "All students are hardworking" or "Some books are interesting." Quantifiers help represent knowledge clearly and precisely."
Answer
From the book: "This quantifier is used when a condition is satisfied by some object but not necessarily all. It helps in expressing possibilities and specific examples. The existential quantifier is important for problem solving and reasoning."
Answer
From the book: "Predicate logic can be used to solve real-world problems by representing knowledge clearly and systematically. It helps us model situations involving objects, their properties, and relationships. Using predicate logic, we can analyze problems, make decisions, and find solutions logically."
Answer
From the book: "Predicates can represent relationships between objects in the real world. For example, Borrows(x, y) means "student x borrows book y," and Teaches(t, s) means "teacher t teaches student s." These predicates clearly describe how students, books, and teachers are connected."
Answer
From the book: "∀x, Student(x) → Borrows(x, Book) means "every student borrows a book." ∃y, Book(y) ∧ Available(y) means "there exists at least one book that is available."" Note: in the first formula "Book" is used like the name of one object; a fully formal version is ∀x (Student(x) → ∃y (Book(y) ∧ Borrows(x, y))). In the exam, write the book's formula and meaning as printed.
Answer
From the book: "Using predicate logic, we can draw conclusions from given facts. For example, if "∀x, Student(x) → HasLibraryCard(x)" and "Ali is a student," then we conclude "Ali has a library card.""
Answer
From the book: "This logical reasoning helps in decision making, such as checking whether a student can borrow a book. It ensures correct and consistent conclusions, making the system reliable and easy to manage."
Answer
From the book: "Quantifiers help us write general rules about the library." "These statements help define rules and conditions in a precise way. Quantifiers allow us to describe both general situations and specific cases in the library system."
Answer
From the book: "Logic-based reasoning and inference are ways of thinking that help us draw conclusions from known facts. This method uses rules of logic to reach conclusions step by step."
Answer
From the book: "Logical inference is the process of deriving new facts from known information. It is a way of reasoning that follows logical rules. For example, if we know "All humans are mortal" and "Socrates is a human," we can infer that "Socrates is mortal.""
Answer
From the book: "Deduction is a type of reasoning that starts from general facts to reach a specific conclusion. Logical rules like "if-then" statements are used in deduction. For example, "If it rains, the ground gets wet" and "It is raining" lead to the conclusion "The ground is wet.""
Answer
From the book: "Deduction is reliable because the conclusion is guaranteed to be true if the premises are true."
Answer
From the book: "It is used in mathematics, computer science, and artificial intelligence. Inference helps in making decisions based on evidence. It is a fundamental concept in logic and reasoning."
Answer
From the book: "Reasoning helps us solve problems, make decisions, and verify information. Logical inference ensures that conclusions are correct and reliable. Understanding this concept improves critical thinking skills. Logic-based reasoning is essential for solving complex real-world problems."
Answer
Computational thinking is a way of thinking to solve problems clearly and logically. It helps us break big problems into smaller and simpler parts. This thinking is not only for computer science students. (Page 20) Computational thinking means thinking like a problem solver. It focuses on understanding a problem step by step. (Page 20) TIDBIT (page 20): "Computational thinking is used by scientists, engineers, and even chefs when planning complex tasks."
Answer
From the book:
It is useful for everyone: "This thinking is not only for computer science students." TIDBIT: it "is used by scientists, engineers, and even chefs when planning complex tasks."
Answer
"Breaking a problem into smaller parts is called decomposition. A big problem can be difficult to solve at once. Smaller parts are easier to understand and manage. Each part can be solved step by step." (2.2, page 21) It "allows us to focus on one task at a time". Summary (page 30): "Decomposition is the process of breaking a large or complex problem into smaller and manageable parts."
Answer
"Creating step-by-step solutions helps us solve problems in an organized way. These steps are known as algorithms. Each step should be clear and simple to follow. The steps must be in the correct order." (2.2, pages 21 to 22) Summary (page 30): "An algorithm is a step-by-step set of instructions used to solve a problem or perform a task." Example: Figure 2.2: Step by Step Algorithm Example (making tea: Start, Boil Water, Steep Tea, Add Milk or Lemon, Serve Tea, End).
Answer
In computer science, logic means using rules to make correct decisions. Logic helps computers understand true and false conditions. It allows systems to process information correctly. Logical statements are used in programs and algorithms. These statements help control the flow of programs. Logic is the basis of many computer operations. It helps computers think in a structured way. (Topic 2.3, Logic in Computer Science, page 22)
Answer
A proposition is a statement that is either true or false. It cannot be both true and false at the same time. Questions and commands are not propositions. For example, "The sun rises in the east" is a proposition. A proposition is usually represented by a capital letter, such as P, Q, or R; for example, P = "The sky is blue". (Topic 2.4, Proposition, page 23)
Answer
A truth value tells whether a proposition is true or false. Each proposition P or Q can take the value True (T) or False (F). Truth tables enumerate all possible combinations (2ⁿ rows for n propositions). Truth value of a compound proposition is determined by the values of its components. (Topic 2.5, Truth Values of Propositions, page 25) Example from Figure 2.3 (page 23): "2 + 3=5" is True and "1 > 3" is False.
Answer
Truth tables are used in logic to show the truth values of statements. A truth table lists all possible combinations of truth values. It shows the final result for each combination. They help in checking the correctness of logical expressions. (Topic 2.5, page 24) Summary (page 30): "A truth table is a table used to show the truth values of a logical expression for all possible combinations of its inputs." Example: Figure 2.5: Truth Table for Logical Expressions shows A AND B, A OR B and NOT A for every pair of values of A and B.
Answer
Propositional satisfiability is a concept in logic that checks whether a statement can be true. It helps us know if a logical expression has at least one situation where it is true. (Topic 2.7, page 26) A proposition is satisfiable if there is at least one combination of truth values that makes it true. If all possible combinations make it false, it is unsatisfiable. (Page 26) Example: "P OR Q" is satisfiable; "P AND NOT P" is unsatisfiable because P cannot be both true and false. (Page 26)
Answer
A predicate is a statement that can be true or false depending on the values of the variables. For example, "x is greater than 5" is a predicate because it depends on x. (Topic 2.8, Introduction to Predicate Logic, page 27) Predicates describe properties or relationships of objects. For example, "isEven(x)" is true if x is an even number. (Page 27) Summary (page 30): "A predicate is a logical expression that describes a property or relationship of a subject, such as (Tall(Ali))."
Answer
Cover the whole topic, using the book's text:
Aim for 250-350 words.
Answer
Name each step with its label from Figure 2.1 (page 21), then the matching sentence from "Computational Thinking" (page 20) and the matching example from "Real-life examples of Computational Thinking" (page 21):
End with the book's line: "All these activities use computational thinking in real life (as shown in Figure 2.1)." Note: the book prints the four step names only in the figure; joining each name to a text sentence is the student's explanation.
Aim for 200-300 words.
Answer
The steps are the four sub-headings of topic 2.2, in book order (pages 21 to 22):
Aim for 250-350 words.
Answer
Cover the last two sub-headings of 2.2 (pages 21 to 22):
Aim for 200-300 words.
Answer
Cover the whole topic, using the book's text:
Aim for 200-300 words.
Answer
Cover the opening paragraph and the first two sub-headings, using the book's text:
Aim for 200-300 words.
Answer
Cover the sub-heading "Logical connectives: AND, OR, NOT", using the book's text:
Aim for 150-250 words.
Answer
Cover the whole topic, using the book's text:
Aim for 200-300 words plus the table.
Answer
Draw Figure 2.5: Truth Table for Logical Expressions exactly:
| A | B | A AND B | A OR B | NOT A |
|---|---|---|---|---|
| True | True | True | True | False |
| True | False | False | True | False |
| False | True | False | True | True |
| False | False | False | False | True |
Then explain, using the book's text:
Aim for 150-200 words plus the table.
Answer
Cover all three parts, using the book's text:
Aim for 250-350 words.
Answer
Follow the book's method: "Each expression is tested for all possible truth values. If the results match in every case, they are equivalent."
| A | B | (A AND NOT B) OR (B AND NOT A) | (A OR B) AND (NOT A OR NOT B) |
|---|---|---|---|
| F | F | F | F |
| F | T | T | T |
| T | F | T | T |
| T | T | F | F |
Note: the text uses "≡" for equivalence, the figure uses "⟺". Both are accepted here; "≡" is the symbol the text gives.
Aim for a full truth table plus 80-120 words.
Answer
Cover all parts, using the book's text:
Aim for 250-350 words.
Answer
Aim for two truth tables plus 120-180 words.
Answer
Cover these points, using the book's text:
Aim for 250-350 words.
Answer
Aim for 200-300 words.
Answer
Cover both sub-headings and the figure, using the book's text:
Aim for 200-300 words.
Answer
Use the 2.9 opening paragraph and the sub-heading "Using Quantifiers in Logical Statements":
Aim for 150-250 words.
Answer
This book question spans three topics. Parts 1 and 2 come from topics 2.8 and 2.9 (marked); part 3 is this topic, 2.10.
Aim for 300-400 words.
Answer
Cover the three sub-headings of 2.10 in order, using the book's text:
Aim for 200-300 words.
Answer
Cover both sub-headings, using the book's text:
Aim for 200-300 words.
Answer
Use the 2.11 opening paragraph and the uses named in "Logical Inference" and "Deduction Using Logical Rules":
Aim for 150-250 words.
Answer
Use topic 2.1 (pages 20 to 21), the 2.2 opening (page 21) and the Summary (page 30).
Aim for the definition + the steps of computational thinking + three points on its importance + the book's real-life examples and Figure 2.1.
Answer
The steps are the four sub-headings of topic 2.2 (pages 21 to 22), in book order.
Aim for the four steps in order + the decomposition definition + the trip example.
Answer
Use the book's text (topic 2.3, page 22).
Aim for the definition + the TIDBIT + logic in computer science + its role in reasoning and decision making + one if-then example.
Answer
Use the book's text (topic 2.4, pages 23 to 24).
Aim for definition + Figure 2.3 examples + proposition + simple and compound with one example each + the three connectives.
Answer
Use the book's text (topic 2.5, pages 24 to 25).
| A | B | A AND B | A OR B | NOT A |
|---|---|---|---|---|
| True | True | True | True | False |
| True | False | False | True | False |
| False | True | False | True | True |
| False | False | False | False | True |
Aim for definition + the creating steps + the 2ⁿ rule + the purpose + the Figure 2.5 table.
Answer
Use the book's text (topic 2.6, pages 25 to 26).
Aim for definition + the Figure 2.6 example with its four rows + how equivalence is identified + four points on its importance.
Answer
Use the book's text (topic 2.7, page 26).
Aim for definition + its uses + the two conditions + three P/Q examples + the pizza example.
Answer
Use the book's text (topics 2.8, 2.9 and 2.10, pages 27 to 29).
Aim for predicate logic with one example + the two quantifiers with symbols and examples + the library example (relationships, quantified rules, one conclusion).