GATE CSE
First time here? Checkout the FAQ!
x
+2 votes
111 views

A palindrome is a string whose reversal is identical to the string. How many bit strings of length n are palindromes?

  1.   2⌈n⁄2⌉
  2.   2(⌊ n/2⌋ )
  3.   2⌈n⁄2⌉ -1
  4.   2(⌊ n/2⌋) -1
asked in Combinatory by Veteran (11.1k points)   | 111 views

1 Answer

+4 votes

Try with N= 2 you get aa,bb 2⌈n⁄2⌉  = 2

Try with N= 3 you get aaa,bbb ,aba , bab  2⌈n⁄2⌉  = 4

Try with N= 4 you get aaaa,bbbb ,abba , baab , 2⌈n⁄2⌉  = 4

A is answer

answered by Veteran (44.5k points)  

Related questions

+2 votes
1 answer
1
+2 votes
1 answer
3
Top Users Feb 2017
  1. Arjun

    5234 Points

  2. Bikram

    4230 Points

  3. Habibkhan

    3828 Points

  4. Aboveallplayer

    3006 Points

  5. Debashish Deka

    2378 Points

  6. sriv_shubham

    2308 Points

  7. Smriti012

    2148 Points

  8. Arnabi

    2008 Points

  9. sh!va

    1672 Points

  10. mcjoshi

    1628 Points

Monthly Topper: Rs. 500 gift card

20,841 questions
26,000 answers
59,638 comments
22,072 users