Question 25Asked in Bihar STET Paper 2 Computer Science (Class 11-12), 12 Sep 2023, Shift 1 + 1 more paper

In the Tower of Hanoi problem with "n" disks, how many moves are required to solve the problem?"n" डिस्क के साथ हनोई टॉवर समस्या में, समस्या को हल करने के लिए कितनी चालों की आवश्यकता है?

"n" डिस्क के साथ हनोई टॉवर समस्या में, समस्या को हल करने के लिए कितनी चालों की आवश्यकता है?
  1. Ann
  2. B2n2n
  3. C2^n - 12^n - 1
  4. D2^n2^n
Show answerHide answer

Correct answer: (C) 2^n - 12^n - 1

Explanation

T(n) = 2T(n-1) + 1 with T(1) = 1 gives 2^n - 1 moves. For example, 3 disks need 7 moves.T(1) = 1 के साथ T(n) = 2T(n-1) + 1 का हल 2^n - 1 चालें है। उदाहरण के लिए 3 डिस्क के लिए 7 चालें चाहिए।

From Bihar STET Paper 2 Computer Science (Class 11-12) PYQ, 12 Sep 2023, Shift 1

This is question 25 of Bihar STET Paper 2 Computer Science (Class 11-12) PYQ, 12 Sep 2023, Shift 1. See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.

Asked in 2 papers