Data Structure Algorithms Articles

Page 2 of 24

Difference between Pushdown Automata and Finite Automata

Shirjeel Yunus
Shirjeel Yunus
Updated on 19-Aug-2024 3K+ Views

Automata is a theoretical concept which is taught in computer science and mathematics. The topics included in automata include abstract machines. These machines have to deal with computational problems and resolve them. Automata theory is used to develop methods which can be used in the description and analysis of the dynamic behavior of the discrete system. There are two types of automata which are Pushdown automata and finite automata. In this article, we will discuss the difference between Pushdown Automata and Finite Automata. What is Pushdown Automata? Pushdown automata is a finite state machine which also consists of additional stack ...

Read More

What is the difference between DFA and NFA?

Bhanu Priya
Bhanu Priya
Updated on 31-Oct-2023 73K+ Views

DFA is the short form for the deterministic finite automata and NFA is for the Non-deterministic finite automata. Now, let us understand in detail about these two finite automata.DFAA Deterministic Finite automata is a five-tuple automata. Following is the definition of DFA −M=(Q, Σ, δ, q0, F)Where, Q : Finite set called states.Σ : Finite set called alphabets.δ : Q × Σ → Q is the transition function.q0 ϵ Q is the start or initial state.F : Final or accept state.NFANFA also has five states same as DFA, but with different transition function, as shown follows −δ: Q X Σ ...

Read More

Implementing a Recommendation System

Sohail Tabrez
Sohail Tabrez
Updated on 13-Jul-2023 554 Views

Introduction A type of information filtering system called a recommendation system looks at user data to suggest things that might be of interest to them. It is generally utilized in different areas, like web-based business, virtual entertainment, and diversion. Data collection, data preprocessing, algorithm selection, and algorithm evaluation are just a few of the steps involved in putting a recommendation system into action. In this article, we will talk about these means exhaustively and give a few reasonable tips to building a viable proposal framework. The Recommendation System A Data Collection Collecting relevant data is the first step in building ...

Read More

Can we use Simple Queue instead of Priority queue to implement Dijkstra’s Algorithm?

Sonal Meenu Singh
Sonal Meenu Singh
Updated on 22-Feb-2023 3K+ Views

Introduction Dijkstra’s Algorithm is used to find the shortest possible distance between two objects. To implement this algorithm we mostly use Priority Queue. In this tutorial, we will find the answer to whether can we use a simple queue to implement Dijkstra’s algorithm instead of a Priority Queue. What is a Priority Queue and A Queue? A queue is a linear array of data. It represents the Queue of real life. A simple Queue uses FIFO (First In First Out) approach for its deQueue and enQueue operations. A priority Queue is a type of Queue that deQueue its elements with ...

Read More

Difference Between Quick Sort and Merge Sort

Kiran Kumar Panigrahi
Kiran Kumar Panigrahi
Updated on 21-Feb-2023 6K+ Views

The task of arranging the elements of an array in a particular order is referred to as sorting. The sorting of an array or a list is mainly done to make the searching easier. There are several types of sorting algorithms, but in this article, we will concentrate on quick sort and merge sort. Both quick sort and merge sort algorithms are based on the divide-and-conquer sorting algorithms, hence they work almost in a similar way. Read this article to learn more about quick sort and merge sort and how these sorting techniques are different from each other. What is ...

Read More

Difference Between Bubble Sort and Selection Sort

Kiran Kumar Panigrahi
Kiran Kumar Panigrahi
Updated on 20-Feb-2023 15K+ Views

The task of arranging elements of an array in a particular order is referred to as sorting. The sorting of an array or a list is mainly done to make the searching easier. There are two types of sorting algorithms namely, Bubble Sort and Selection Sort. Bubble sort performs sorting of data by exchanging the elements, while the selection sort performs sorting of data by selecting the elements. Read this article to learn more about bubble sort and selection sort and how these two sorting techniques are different from each other. What is Bubble Sort? Bubble sort is a simple ...

Read More

Top 7 Clustering Algorithms Data Scientists Should Know?

Jay Singh
Jay Singh
Updated on 28-Dec-2022 565 Views

Clustering algorithms are a type of machine learning algorithm that can be used to find groups of similar data points in a dataset. These algorithms are useful for a variety of applications, such as data compression, anomaly detection, and topic modeling. In some cases, clustering algorithms can be used to find hidden patterns or relationships in a dataset that might not be immediately apparent. By grouping similar data points together, clustering algorithms can help to simplify and make sense of large and complex datasets. In this post, we will look closely at Clustering algorithms and the top seven algorithms that ...

Read More

Design a TM for an equal number of a’s and b’s must follow a

Bhanu Priya
Bhanu Priya
Updated on 10-Mar-2022 5K+ Views

The Turing machine (TM) is more powerful than both finite automata (FA) and pushdown automata (PDA). They are as powerful as any computer we have ever built.Formal Definition of Turing MachineA Turing machine can be formally described as seven tuples(Q, X, Σ, δ, q0, B, F)Where, Q is a finite set of statesX is the tape alphabetΣ is the input alphabetδ is a transition function: 𝛿:QxX→QxXx{left shift, right shift}q0 is the initial stateB is the blank symbolF is the final state.A Turing Machine (TM) is a mathematical model which consists of an infinite length tape divided into cells on which ...

Read More

How to generate regular expression from finite automata?

Bhanu Priya
Bhanu Priya
Updated on 16-Jun-2021 2K+ Views

There are two methods for converting deterministic finite automata (DFA) to Regular expression (RE). These are as follows −Arden’s MethodState Elimination MethodLet us understand these methods in detail.Arden’s TheoremLet P and Q be the two regular expressions.If P does not contain null string, then following equation in R, viz R = Q + RP,Which has a unique solution by R = QP*Here,The finite Automata do not have epsilon movesIt must have only initial state q1It’s states are q1, q2, q3,…….qn. The final state may be some qi where i

Read More

Prove that Linear bounded automata LBA ⊂ PSPACE in TOC?

Bhanu Priya
Bhanu Priya
Updated on 16-Jun-2021 518 Views

Linear Bounded Automaton (LBA) is a restricted form of Turing Machine in which input tape is finite.ExampleProve that LBA ⊂ PSPACEPSPACE is a superset of the set of context-sensitive languages.Now to prove LBA=PSPACE, We use theorem of Space compression with tape reduction which states that, For every k-tape S(n) space-bounded off-line Turing Machine M and constant c>0, there exists a one-tape cS(n) space-bounded off-line turing machine N such that L(M)=L(N).Following identity holds for −DSPACE(S(n))=DSPACE(O(S(n)))and NSPACE(S(n))=NSPACE(O(S(n)))Since LBA is one-tape n space-bounded Turing Machine it follows −LBA=NSPACE(n)---------------------(1)Now by Savitch theorem, if S is fully space constructible and S(n)>log(n) thenNSPACE(S(n)) ⊆DSPACE(S^{2}(n)) -------------(2)Final proofLBA=NSPACE(n)............by(1)⊆DSPACE(n^{2})............by(2)⊂DSPACE(n^{3})............by ...

Read More
Showing 11–20 of 234 articles
« Prev 1 2 3 4 5 24 Next »
Advertisements