100 likes | 359 Views
Decidability. Decidability. Definition An effective solution to a problem that has a yes or no answer is called a decision procedure . A problem that has a decision procedure is called decidability. Decidability. Two regular expressions are the same? Two FAs are the same?. Decidability.
E N D
Decidability Dr. Shakir Al Faraji
Decidability Definition An effective solution to a problem that has a yes or no answer is called a decision procedure. A problem that has a decision procedure is called decidability. Dr. Shakir Al Faraji
Decidability Two regular expressions are the same? Two FAs are the same? Dr. Shakir Al Faraji
Decidability Two regular expressions are the same? Algorithm • Delete all stars * • For each + throw away the right half of the sum and the + sign itself • Remove all parentheses • Concatenate all remaining elements • The result is a word Dr. Shakir Al Faraji
Decidability-Example Two regular expressions are the same? Consider RE1: a(a+b)* Accepts all words start with a RE2 : (b+)(baa+ba*)* Accepts all words start with b These expressions have no word in common Dr. Shakir Al Faraji
Decidability-Example RE1: a(a+b)* RE2 : (b+)(baa+ba*)* a(a+b)* : a(a+b) : a(a) : aa (b+)(baa+ba*)* (b+)(baa+ba ) (b )(baa ) bbaa So they are not the same Dr. Shakir Al Faraji
Decidability-Example (a+)(ab*+ba*)*(+b*)* (a+)(ab +ba) (+b ) (a )(ab ) ( ) aab aabword Dr. Shakir Al Faraji
Decidability Two FAs are the same? 1. Convert FA to RE and use Algorithm OR 2. FA = (L1∩L’2)+(L’1∩ L2) and this machine cannot accept any words. Dr. Shakir Al Faraji
END Dr. Shakir Al Faraji