275 views
0 votes
0 votes
The value of a regular expression r over ∑, denoted by Val(r), is defined as follows :
1. Val (Ø) = 0
2. Val (ε) = 0
3. Val (a) = 0 for every a ε ∑
4. Val ((r. s)) = Val ((r + s)) = max(Val (r), Val (s))
5. Val ((r*)) = Val (r) + 1
  Find the value of regular expression (a (a + a*a a))
(1)  3 (2)  2 (3)  1 (4)  0

How max function working here? 

1 Answer

Best answer
2 votes
2 votes
$Val(a(a+a^*aa))=max(val(a),val(a+a^*aa))$

$=max(0, val(a+a^*aa))$

$=max(val(a),val(a^* aa))$

$=max(0, val(a^*aa))$

$=max(0,max(val(a^*),val(aa)))$

$=max(val(a^*),0)\;\;$

($   \because val(aa)=max(val(a),val(a))=max(0,0)=0$

$=max((val(a)+1),0)$

$=1$
selected by

Related questions

0 votes
0 votes
0 answers
1
srestha asked Apr 11, 2019
452 views
How many no. of states in DFA for the following required expression?$(a + b + c) (a + b + c) (a + b + c) (a + b + c) ……… (n – 2)$ times $(a + b + c)^{+}$$(1) $$n ...
1 votes
1 votes
1 answer
2
srestha asked Apr 11, 2019
575 views
The regular expression 0*(10*)* denote the same set as(1) (1*0)*1*(2) 0+(0+10)*(3) (0+1)*10(0+1)*(4) None of theseIsnot 1) as same as given expression?
1 votes
1 votes
0 answers
3
srestha asked May 24, 2019
1,322 views
$1)$How circular queue can be implemented?$2)$ For which data structure circular queue cannot be implemented?$(A)$Array $(B)$ Singly Linked List $(C)$ Doubly Linked List...