recategorized by
2,351 views
2 votes
2 votes

The number of strings of length 4 that are generated by the regular expression $(0+ 1+ | 2+ 3+ )^{*}$, where | is an alternation character and ${+, ^{*}}$ are quantification characters, is :

  1. $08$
  2. $09$
  3. $10$
  4. $12$
recategorized by

2 Answers

3 votes
3 votes

Given RegExp = (0+1+|2+3+)

We can assume this exp as (A+|B+)*  . We can form the string with A(01) or B(23) or both(01,23). So below are the 10 possible 4 char strings.

With 01 --> 0111, 0011, 0001, 0101

With 23 --> 2333, 2233, 2223, 2323

Using both 01 and 23 --> 0123, 2301

Hope it helps.. Thanks :)

0 votes
0 votes

I think answer is (D).

Number of sequences are as:

0001, 0011, 0111, 0123, 0122, 0012, 0112, 2223, 2233, 2333, 2301, 2330

 

 

Related questions

2 votes
2 votes
1 answer
2
makhdoom ghaya asked Sep 28, 2016
2,861 views
In Data mining, ______ is a method of incremental conceptual clustering.STRINGCOBWEBCORBAOLAD
1 votes
1 votes
1 answer
3
makhdoom ghaya asked Sep 28, 2016
2,415 views
Discovery of cross sales opportunities is called as _____.AssociationVisualizationCorrelationSegmentation
1 votes
1 votes
2 answers
4
makhdoom ghaya asked Sep 28, 2016
4,734 views
In Data mining, classification rules are extracted from _______.DataInformationDecision TreeDatabase