Arnab Chakraborty has Published 4293 Articles

Construct a Turing Machine for language L = {0n1n2n | n≥1}

Arnab Chakraborty

Arnab Chakraborty

Updated on 03-Jan-2020 11:28:08

5K+ Views

Here we will see how to make a Turing machine for language L = {0n1n2n | n ≥ n}. So this represents a kind of language where we will use only three characters 0s, 1s and 2s. The w is a string. So if w = 000111222, The Turing machine ... Read More

Construct a Turing machine for L = {aibjck | i>j>k; k ≥ 1}

Arnab Chakraborty

Arnab Chakraborty

Updated on 03-Jan-2020 11:26:31

820 Views

Here we will see how to make a Turing machine for language L = {AiBjCk | i > j > k; k ≥ 1}. So this represents a kind of language where we will use only three characters a, b and c. The w is a string. So if w ... Read More

Construct a Turing machine for L = {aibjck | i< j< k; i ≥ 1}

Arnab Chakraborty

Arnab Chakraborty

Updated on 03-Jan-2020 11:24:50

2K+ Views

Here we will see how to make a Turing machine for language L = {AiBjCk | i < j < k; i ≥ 1}. So this represents a kind of language where we will use only three characters A, B and C. The w is a string. So if w ... Read More

Construct a Turing machine for L = {aibjck | i*j = k; i, j, k ≥ 1}

Arnab Chakraborty

Arnab Chakraborty

Updated on 03-Jan-2020 11:23:30

2K+ Views

Here we will see how to make a Turing machine for language L = {AiBjCk | i * j = k; i, j, k ≥ 1}. So this represents a kind of language where we will use only three characters A, B and C. The w is a string. So ... Read More

Construct a graph from given degrees of all vertices in C++

Arnab Chakraborty

Arnab Chakraborty

Updated on 03-Jan-2020 11:21:57

331 Views

Suppose we have a list of vertices, and their degrees are given. We have to generate one undirected graph from that degree sequence. It will not include loop or multiple edges. So if the degree sequence is like [2, 2, 1, 1], then the graph can be likeTo solve this, ... Read More

Construct a frequency array of digits of the values obtained from x^1, x^2, ....., x^n in C++

Arnab Chakraborty

Arnab Chakraborty

Updated on 03-Jan-2020 11:18:25

139 Views

Suppose we have two integers x and n. We have to find the array such that it contains the frequency of index numbers occurring in (x^1, x^2, … x^(n – 1), x^n). So if x = 15 and n = 3, then output will be [0, 1, 2, 2, 0, ... Read More

Why is a[i] == i[a] in C/C++ arrays?

Arnab Chakraborty

Arnab Chakraborty

Updated on 03-Jan-2020 11:15:27

331 Views

Here we will see one amazing trick in C or C++. The array subscript A[i] can also be written as i[a]. In C/C++ E1[E2] is defined as (*((E1) + (E2))). The compiler performs arithmetic internally to access the array elements. Because of the conversion of rules, that is applied to ... Read More

Unary operators in C/C++

Arnab Chakraborty

Arnab Chakraborty

Updated on 03-Jan-2020 11:14:06

2K+ Views

Here we will see what are the unary operators in C / C++. Unary operator is operators that act upon a single operand to produce a new value. The unary operators are as follows.OperatorDescriptionIndirection operator (*)It operates on a pointer variable and returns an l-value equivalent to the value at ... Read More

Type Conversion in C++

Arnab Chakraborty

Arnab Chakraborty

Updated on 03-Jan-2020 11:11:22

2K+ Views

Here we will see what are the type conversion techniques present in C++. There are mainly two types of type conversion. The implicit and explicit.Implicit type conversionThis is also known as automatic type conversion. This is done by the compiler without any external trigger from the user. This is done ... Read More

Top Reasons to Learn C++

Arnab Chakraborty

Arnab Chakraborty

Updated on 03-Jan-2020 11:08:36

211 Views

Here we will see some good reasons behind taking the language C++ as our favorite programming language. We know that C++ is one of the most popular object oriented programming language. These are the reasons behind taking the C++ into consideration.C++ Popularity and High salary −C++ is one of the ... Read More

Advertisements