Bhanu Priya has Published 1449 Articles

Explain the concept of state elimination method in TOC

Bhanu Priya

Bhanu Priya

Updated on 11-Jun-2021 12:57:11

3K+ Views

There are two methods for converting a Deterministic Finite Automata (DFA) to Regular expression (RE). These methods are as follows −Arden's Theorem Method.State Elimination Method.Now, let us learn about the state elimination method used in TOC.State Elimination MethodStep 1Initial state of DFA does not have any incoming edge.If there exists ... Read More

Find out the Regular expression for the given finite automata

Bhanu Priya

Bhanu Priya

Updated on 11-Jun-2021 12:56:01

5K+ Views

ProblemConstruct a regular expression for the given finite automata.SolutionStep 1 − Let us write down the equation.q1=q1a+ εq1 is the start state and ε will be added as the input a which is coming to q1 from q1.Hence, we writeState=source state of input * input coming to itStep 2 − ... Read More

Explain Arden’s theorem to convert DFA to Regular Expression

Bhanu Priya

Bhanu Priya

Updated on 11-Jun-2021 12:23:30

6K+ Views

There are two methods for converting a Deterministic Finite Automata (DFA) to Regular expression (RE). These methods are as follows −Arden's Theorem Method.State Elimination Method.Let us understand the Arden's Theorem method in detail.Arden's TheoremLet P and Q be the two regular expressions.If P does not contain null string, then the ... Read More

C program to print name inside heart pattern using for loop.

Bhanu Priya

Bhanu Priya

Updated on 26-Mar-2021 08:03:25

3K+ Views

ProblemWrite a program to print heart shaped pattern with the name in centre using for loop.SolutionThe user has to enter the name that should be printed in centre along with the number of rows the stars has to be print.AlgorithmRefer an algorithm given below to print the name in heart ... Read More

C program to store the car information using dynamic linked list.

Bhanu Priya

Bhanu Priya

Updated on 26-Mar-2021 07:57:51

4K+ Views

Linked lists use dynamic memory allocation i.e. they grow and shrink accordingly. It is collection of nodes.Node has two parts which are as follows −DataLinkTypes of Linked ListsThe types of linked lists in C programming language are as follows −Single / Singly linked listsDouble / Doubly linked listsCircular single linked ... Read More

C program to perform intersection operation on two arrays

Bhanu Priya

Bhanu Priya

Updated on 26-Mar-2021 07:55:31

9K+ Views

Intersection operationIf array 1 = { 1,2,3,4,6}  Array 2 = {1,2,5,6,7}Then, intersection of array1 and array 2 isArray1 ^ array 2 = {1,2,3,4,6} ^ {1,2,5,6,7}         = {1,2,6}Set of common elements is called an intersection.The logic for intersection is as follows −k=0; for(i=0;i

C program to find the area of circle and cylinder using structures.

Bhanu Priya

Bhanu Priya

Updated on 26-Mar-2021 07:54:54

2K+ Views

In C programming language, we can find the area of circle, area and volume of cylinder with the help of structures.The logic used to find area of circle is as follows −s.areacircle = (float)pi*s.radius*s.radius;The logic used to find area of cylinder is as follows −s.areacylinder = (float)2*pi*s.radius*s.line + 2 * ... Read More

What is an anagram in C language?

Bhanu Priya

Bhanu Priya

Updated on 26-Mar-2021 07:52:46

4K+ Views

Anagram strings are nothing but, all the characters that occur for the same number of times in another string, which we call as anagrams.A user enters two strings. We need to count how many times each letter ('a' to 'z') appears in them and then, compare their corresponding counts. The ... Read More

C program to perform union operation on two arrays

Bhanu Priya

Bhanu Priya

Updated on 26-Mar-2021 07:52:41

15K+ Views

A union is a special data type available in C programming language that allows to store different data types in the same memory location. Unions provide an efficient way of using the same memory location for multiple-purpose.Union operationIf array 1 = { 1, 2, 3, 4, 6}    Array 2 ... Read More

C Program find nCr and nPr.

Bhanu Priya

Bhanu Priya

Updated on 26-Mar-2021 07:50:25

17K+ Views

In C programming language, nCr is referred as the combination. nCr is the selection of r objects from a set of n objects, where the order of objects does not matter.nPr is referred as the permutation. nPr is arrangement of 'r' objects from a set of 'n' objects, which should ... Read More

Advertisements