Regular and Non-Regular Language difference?

Thread Starter

zulfi100

Joined Jun 7, 2012
633
Hi,

Q1. A regular language is any (finite or infinite) set of (finite) strings? True

finite set: L= w | w is a set of 'a's less than 1000

inifinite set L= a^n | n >= 0

Q2. A non-regular language is any (finite or infinite) set of (infinite) strings? True

infinite set L= a^n . b^n | n>=0
finite set L=?

Some body please guide me if the true/false are correct and what is an example of a non-regular language having a finite set of infinite length strings?
Zulfi.
 

WBahn

Joined Mar 31, 2012
26,067
Q1. A regular language is any (finite or infinite) set of (finite) strings? True

finite set: L= w | w is a set of 'a's less than 1000

inifinite set L= a^n | n >= 0
Q1 is claiming that ANY set of finite strings is a regular language. So if you can find just one set of finite strings that is not a regular language, what does that tell you about the truth of that claim?

Some body please guide me if the true/false are correct and what is an example of a non-regular language having a finite set of infinite length strings?
Can you think of a string that you know has an infinite number of characters in it? Hint: Math is littered with them.
 

Thread Starter

zulfi100

Joined Jun 7, 2012
633
Q1 is claiming that ANY set of finite strings is a regular language. So if you can find just one set of finite strings that is not a regular language, what does that tell you about the truth of that claim?
Hi,
You have already told me that all finite languages are regular.
So its not possible.

Zulfi.



Can you think of a string that you know has an infinite number of characters in it? Hint: Math is littered with them.
[/QUOTE]
Set of Even Numbers.
What about Q2.

Zulfi.
 

WBahn

Joined Mar 31, 2012
26,067
There is a difference between saying that a regular language is a finite set of strings and saying that a finite set of strings is a regular language.

You also still are not grasping the critical distinction between all of the strings in a language being finite strings and the language being a finite language.

The set of Even Number is a set having an infinite number of members, but each member in that set is a finite string.

Can you not think of a single value that cannot be represented using a finite number of digits?
 

Thread Starter

zulfi100

Joined Jun 7, 2012
633
There is a difference between saying that a regular language is a finite set of strings and saying that a finite set of strings is a regular language.
Hi,
What is the difference? Are both not regular?


[QUOTE
The set of Even Number is a set having an infinite number of members, but each member in that set is a finite string.

Can you not think of a single value that cannot be represented using a finite number of digits?
[/QUOTE]
22/7 (irrational numbers)

Zulfi.
 

WBahn

Joined Mar 31, 2012
26,067
Hi,
What is the difference? Are both not regular?
The set of all palindromes is an set of finite length strings. It is not a regular language.

The set of Even Number is a set having an infinite number of members, but each member in that set is a finite string.

Can you not think of a single value that cannot be represented using a finite number of digits?
22/7 (irrational numbers)
How can 22/7 be an irrational number when, by definition, irrational numbers are those than cannot be written as a ratio of two integers?
 
Top