269 views
0 votes
0 votes
1)  C,C++,JAVA are finite language or not

2) Every finite language are regular .it is true

3) All regular language are Finite

2 Answers

1 votes
1 votes
1)  C, C++, JAVA ALL ARE INFINITE LANGUAGE . WE CAN CREATE INFINITE PROGRAMS

THINK PROGRAMS AS STRINGS OF LANGUAGE SO WE CAN CREATE INFINITE SO IT IS INFINITE.

2) IT IS TRUE EVERY FINITE IS REGULAR AS WE CAN FIND IT IN FINITE TIME.

3) FALSE

REGULAR LANGUAGES CAN BE FINITE AND INFINITE INFINITE LIKE STRING START WITH A
0 votes
0 votes

1st part: these languages are not finite since you can have any number of programs written in these languages,

2nd part: No doubt in this , because once the language is finite you can construct Finite automata such that all the strings present in the language are accepted ,here we don't care about the number states as long as it is finite.

 

3rd part: No all regular language are not finite for instance take the example of L={a| n>=0},L={anbm| n,m>=0}, is a regular language which is finite.

 

 

Related questions

0 votes
0 votes
1 answer
1
kallu singh asked Sep 6, 2017
209 views
Q. Consider the following CFG.E → E ∗ T | T+E | TT → (T ∗ F) | FF → idCan we generate following string(id∗id∗id)
2 votes
2 votes
2 answers
2
kallu singh asked Sep 5, 2017
678 views
Q if any Grammar is LL(1) definitely LALR(1) ?It is true or falsePlease ans explain in detail.
0 votes
0 votes
0 answers
3
kallu singh asked Dec 3, 2018
248 views
0 votes
0 votes
0 answers
4
kallu singh asked Nov 17, 2018
600 views
Q. let S be the binary semaphore variable S=1 initially. Assume that no block processes exit in the system. If the following operation performed ,how many blocked process...