0% found this document useful (0 votes)
5 views

Assignment 2_Problem Solving

This document outlines Assignment 2 for B.Tech. (CSE All) students at the University of Petroleum & Energy Studies, focusing on problem-solving skills. It includes a series of logical puzzles and mathematical problems related to knights and knaves, social relationships among groups, the Tower of Hanoi, and identifying a fake coin among genuine ones. Each question carries equal marks, and the use of CHATGPT is prohibited.

Uploaded by

aashirana222
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Assignment 2_Problem Solving

This document outlines Assignment 2 for B.Tech. (CSE All) students at the University of Petroleum & Energy Studies, focusing on problem-solving skills. It includes a series of logical puzzles and mathematical problems related to knights and knaves, social relationships among groups, the Tower of Hanoi, and identifying a fake coin among genuine ones. Each question carries equal marks, and the use of CHATGPT is prohibited.

Uploaded by

aashirana222
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

School of Computer Science Assignment 2

UNIVERSITY OF PETROLEUM & ENERGY STUDIES, DEHRADUN


Program B.Tech. (CSE All) Semester I

Course Problem Solving Course Code CSEG1027

SN Attempt all the questions. All the questions carry equal marks. The use of COs Marks
CHATGPT is strictly prohibited.
1 You have just arrived on an island inhabited by two kinds of people: knights who always CO3 40
tell the truth, and knaves who always lie. Every inhabitant of the island is either a knight
or a knave, and everyone knows which inhabitants are knights and which are knaves. You
are a stranger on the island, and you do not know who a knight is and who is a knave.
Give your responses on the following:
(A) You come across two inhabitants of this island, A and B. A makes the following
statement: “At least one of us is a knave.” What, if anything, can you determine about
A and/or B? Be prepared to defend your answer!
(B) Suppose that instead, A states: “I am a knave, but B isn’t.” Now, what, if anything,
can be deduced?
(C) It is rumoured that there is gold on the island of knights and knaves. You ask an
inhabitant if there really is gold on the island. He responds, “There is gold on this
island if and only if I am a knight.”
(a) Can it be determined whether the speaker is a knight or a knave?
(b) Can it be determined whether there is gold on the island or not?
(D) This time, suppose that you come across three people, A, B, and C. You ask A, “How
many knights are there among the three of you?” A respond, but he mumbles so badly
that you cannot understand him. So, you turn to B and ask, “What did A say?” B
responds, “A said that there is one knight among us.” Then C says: “Don’t believe B;
he is lying!” Can you tell what B is? What about C? What about A?

2 In a group of six people, every two are either friend or enemy. Shew that there exists at CO3 20
least three people who are either mutually friend or enemy.
School of Computer Science Assignment 2

3 There are three rods (labelled A, B, and C) and N disks of different sizes, which can slide CO4 20
onto any rod. Initially, all disks are stacked in increasing order of size on one rod (A),
with the smallest disk on the top and the largest on the bottom. The objective is to move
the entire stack to another rod (B), following these rules:
1. Only one disk can be moved at a time.
2. A disk can only be placed on top of a larger disk or an empty rod.
3. You may use the third rod (C) as an auxiliary rod during the process.
(A) Prove that (2N-1) moves required to solve the problem for N disks by
Mathematical Induction.
(B) What are the steps to solve the Tower of Hanoi for N=4?
4 There are 12 coins given, out of which one is fake. The fake coin differs in weight (either CO3 20
heavier or lighter) from the genuine coins, which are all the same weight. You have access
to a balance scale to compare the weights of coins. The minimum number of weighing is
three only. Your goal is to:
1. Identify the fake coin.
2. Determine whether the fake coin is heavier or lighter.

You might also like