The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
0 votes
82 views
Consider the string “GATE2000”, the number of non-trivial substrings of given string are

i am constatly confused in these types of substrings questions please specify some resource or plzz derive how to solve these questions
in Compiler Design by Loyal (7.8k points) | 82 views
0
non-trivial means the substring's excluding $\varepsilon$ and the string itself.
0
hmm whats answer of above
0
35 ?
0
it is  32 but close enough whats approach
0
Total 37 substring, 35 are non-trvial and

total 2 ^8 subsequence.
+3
count the number of substrings it would be 8*9/2 = 36

000 -- three 1 length substrings 0,0,0 which are same, two 2 length substrings 00, 00 are same

1 for the original string

36 - (1+2+1) = 32
+1

answer should be 32 only there are 3 0's so substring '0','0','00' should be excluded from 35.

@Deepanshu, there are 8 char. in string so total substring should be -

n(n+1)/2 + 1= 8.9/2 +1 =37

2 are trivial and there are 3 0's so number of total non trivial substring = 37-2-3=32.

+1

@Deepanshu

specify the link in your question.

i edited my answer with your requirement, may you check https://gateoverflow.in/216914/

0
thanku everyone : )

Please log in or register to answer this question.

Related questions

0 votes
1 answer
5
asked Jun 3 in Compiler Design by Rishabh Baghel (49 points) | 46 views
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,309 questions
55,747 answers
192,248 comments
90,534 users