- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Prove the equalities of regular expressions by applying properties?
Problem
Prove each of the following equalities of regular expressions.
a. ab*a(a + bb*a)*b = a(b + aa*b)*aa*b.
b. b + ab* + aa*b + aa*ab* = a*(b + ab*).
Solution
Problem 1
Prove that ab*a(a + bb*a)*b = a(b + aa*b)*aa*b.
Let’s take LHS , = ab*a(a + bb*a)*b Use property of (a+b)* = a*(ba*)* = ab*a (a* ((bb*a) a* )* a*b = ab* a (a*bb*a)* a*b {Associative property} = ab* (a (a*bb*a)*)a*b = ab*(aa*bb*)*aa*b = a (b*(aa*bb*)*)aa*b Use property a* (ba*)*= (a+b)* = a(b+aa*b)*aa*b = RHS Hence proved
Problem 2
Prove that b + ab* + aa*b + aa*ab* = a*(b + ab*).
Let’s take LHS, = b + ab* + aa*b + aa*ab* = (b+aa*b)+(ab*+aa*ab*) = (^+aa*)b+(^+aa*)ab* {using distributing property} = (a*)b+(a*)ab* from ^+aa*=a* = a*b+a*ab* = a*(b+ab*) {distributive property} = RHS Hence proved
Advertisements
To Continue Learning Please Login
Login with Google