Define DFA and NFA

Deterministic finite automaton (DFA)—also known as deterministic finite state machine—is a finite state machine that accepts/rejects finite strings of symbols and only produces a unique computation (or run) of the…

Continue ReadingDefine DFA and NFA

Regular Expressions

Regular expression over ∑={a,b,c} that represent all string of length=>  (a+b+c)(a+b+c)(a+b+c)String having zero or more=> a*String having one or more=> a+All binary string.=>(0+1)*0 or more occurrence of either a or b or both=> (a+b)*1…

Continue ReadingRegular Expressions

C program that illustrates two processes communicating using shared memory

#include #include #include #include struct country { char name[30]; char capital_city [30]; char currency[30]; int population; }; int main(int argc,char*argv[]) { int shm_id; char*shm_addr; int*countries_num; struct country*countries; struct shmid_ds shm_desc;…

Continue ReadingC program that illustrates two processes communicating using shared memory