recategorized by
13,061 views
29 votes
29 votes

In some programming language, an identifier is permitted to be a letter followed by any number of letters or digits. If $L$ and $D$ denote the sets of letters and digits respectively, which of the following expressions defines an identifier?

  1. $(L + D)^+$
  2. $(L.D)^*$
  3. $L(L + D)^*$
  4. $L(L.D)^*$
recategorized by

9 Answers

Best answer
38 votes
38 votes

Correct Option: C

It has to be started by a letter followed by any number of letters (or) digits.

edited by
Answer:

Related questions

26 votes
26 votes
5 answers
1
Kathleen asked Oct 8, 2014
15,740 views
Let $\Sigma=\left\{0,1\right\}, L = \Sigma^*$ and $R=\left\{0^n1^n \mid n 0\right\} $ then the languages $L \cup R$ and $R$ are respectivelyregular, regularnot regular, ...
32 votes
32 votes
8 answers
2
Kathleen asked Oct 8, 2014
10,433 views
Which of the following definitions below generate the same language as $L$, where $L=\{x^ny^n \text{ such that } n\geq 1 \}$?$E \rightarrow xEy\mid xy$$x y \mid (x^+xyy^+...
33 votes
33 votes
5 answers
4
Kathleen asked Oct 8, 2014
21,026 views
The minimum number of edges in a connected cyclic graph on $n$ vertices is:$n-1$$n$$n+1$None of the above