targate 2262

Enter "Paper ID, Question Number" in subject line for query! Start a new thread for every question.

Moderators: karthrags, arun_kumar, CS Moderators Team

Re: targate 2262

Postby amitmandal03 » Mon Feb 04, 2013 3:06 pm

ok my mistake.. but still i have doubts :
consider string 00
d(q0,0,Z0) ->[q0,RZ0] stack content [RZ0]
BY EPSILON transition state changes to q1
d(q1,0,R) ->[q1,z0] stack content [Z0]
d(q1,epsilon,z0) -> [qf,epsilon]

so accepted (odd length palindrome] what's wrong here ?
~Amit
User avatar
amitmandal03
Gatementor Guru
Gatementor Guru
 
Posts: 1539
Joined: Sat Sep 22, 2012 3:19 pm
Currently what are you doing?: Am Studying
My College/Company:: GATE
Roll Number: 0
City: Bangalore

Re: targate 2262

Postby sriram08 » Mon Feb 04, 2013 3:14 pm

amitmandal03 wrote:ok my mistake.. but still i have doubts :
consider string 00
d(q0,0,Z0) ->[q0,RZ0] stack content [RZ0]
BY EPSILON transition state changes to q1
d(q1,0,R) ->[q1,z0] stack content [Z0]
d(q1,epsilon,z0) -> [qf,epsilon]

so accepted (odd length palindrome] what's wrong here ?



00 is even length....try input as 0
sriram08
 
Posts: 5
Joined: Mon Feb 04, 2013 2:11 pm
My College/Company:: Tcs
Roll Number: 28125158

Re: targate 2262

Postby amitmandal03 » Mon Feb 04, 2013 3:19 pm

00 is even length string but odd length palindrome..
then what is meaning of odd length palindrome ? can you give an example .. if we take 010 as wwR what is w here and what is wR ? does this way we consider palindrome ? [middle element as common]
~Amit
User avatar
amitmandal03
Gatementor Guru
Gatementor Guru
 
Posts: 1539
Joined: Sat Sep 22, 2012 3:19 pm
Currently what are you doing?: Am Studying
My College/Company:: GATE
Roll Number: 0
City: Bangalore

Re: targate 2262

Postby sriram08 » Mon Feb 04, 2013 3:30 pm

amitmandal03 wrote:00 is even length string but odd length palindrome..
then what is meaning of odd length palindrome ? can you give an example .. if we take 010 as wwR what is w here and what is wR ? does this way we consider palindrome ? [middle element as common]



00 is of the form W Wr hence even palindrome
010 is of the form W 1 Wr hence odd palindrome.
With string length u can still say the same.
If u still have doubts I wd suggest to google for pda for palindromes....

please correct if I m having misunderstanding something
sriram08
 
Posts: 5
Joined: Mon Feb 04, 2013 2:11 pm
My College/Company:: Tcs
Roll Number: 28125158

Re: targate 2262

Postby amitmandal03 » Mon Feb 04, 2013 3:43 pm

I Don't know.. i think you are right but still i need some reference regarding odd length palindrome [or example] or PDA for odd length palindrome [i had lots of misconceptions . thanx for removing those :) ]

what abt q43 ? isn't option A also correct ?
~Amit
User avatar
amitmandal03
Gatementor Guru
Gatementor Guru
 
Posts: 1539
Joined: Sat Sep 22, 2012 3:19 pm
Currently what are you doing?: Am Studying
My College/Company:: GATE
Roll Number: 0
City: Bangalore

Re: targate 2262

Postby MonikaD » Mon Feb 04, 2013 4:32 pm

yeah for 43 a and c both are correct
MonikaD
Gatementor Resident
Gatementor Resident
 
Posts: 353
Joined: Mon Jul 16, 2012 12:18 am
Currently what are you doing?: Am Studying
My College/Company:: IISC Bangalore
Roll Number: 0
City: Mumbai

Re: targate 2262

Postby sriram08 » Tue Feb 05, 2013 11:30 am

amitmandal03 wrote:I Don't know.. i think you are right but still i need some reference regarding odd length palindrome [or example] or PDA for odd length palindrome [i had lots of misconceptions . thanx for removing those :) ]

what abt q43 ? isn't option A also correct ?


Q43 i agree with u , a and c both are correct
sriram08
 
Posts: 5
Joined: Mon Feb 04, 2013 2:11 pm
My College/Company:: Tcs
Roll Number: 28125158

Previous

Return to CS Paper Question

Who is online

Users browsing this forum: No registered users and 1 guest
cron