Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Articles on Trending Technologies
Technical articles with clear explanations and examples
Resistors in Series
The resistors are said to be connected in series, when they are joined end to end so that there is only one path for the current to flow.ExplanationLet the three pure resistors R1, R2 and R3 be connected in series against a DC voltage source V as shown in the circuit.Referring the circuit it can be written that$$\mathrm{\mathit{V}\:=\:\mathit{V}_{1}+\mathit{V}_{2}+\mathit{V}_{3}\:\:\:\:…(1)}$$Where V1, V2 and V3 being the voltage drops against individual resistors.Assuming I to be the total current in the circuit and R being the equivalent resistance of all the series resistors. Hence, the equation (1) can be written as$$\mathrm{\mathit{IR}=\mathit{IR}_{1}+\mathit{IR}_{2}+\mathit{IR}_{3}}$$$$\mathrm{\Rightarrow\:\mathit{R}=\mathit{R}_{1}+\mathit{R}_{2}+\mathit{R}_{3}\:\:\:\:…(2)}$$Thus, the equation (2) ...
Read MoreResistors in Parallel
When one end of each resistor is joined to a common point and the other end of each resistor is joined to another common point so that there are as many paths for current flow as the number of resistors, it is called as a parallel circuit.The below circuit shows the connection of three resistors in parallel across a DC voltage source V. Let the circuit current be 𝐼 while the branch currents I1, I2 and I3 respectively. The voltage drop in each branch being same, so by Ohm’s law, we can write, $$\mathrm{\mathit{V}=\mathit{I}_{1}\mathit{R}_{1}=\mathit{I}_{2}\mathit{R}_{2}=\mathit{I}_{3}\mathit{R}_{3}}$$Also, by referring the circuit, $$\mathrm{\mathit{I}=\mathit{I}_{1}+\mathit{I}_{2}+\mathit{I}_{3}}$$$$\mathrm{\Rightarrow\frac{\mathit{V}}{\mathit{R}_{p}}=\frac{\mathit{V}}{\mathit{R}_{1}}+\frac{\mathit{V}}{\mathit{R}_{2}}+\frac{\mathit{V}}{\mathit{R}_{3}}}$$Where, RP ...
Read MoreHow to generate regular expression from finite automata?
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 MoreProve that Linear bounded automata LBA ⊂ PSPACE in TOC?
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 MoreConstruct a PDA that accepts (a,b)* language but not contain bbbb?
Push down Automata (PDA) is complement of the PDA that contain Substring bbbStepsMake the PDA for accepting those strings that have conation bbb.Complement it by making non-accepting as accepting and vice versa.Construct PDAYou can construct the PDA as shown below for the (a, b)* languageThe nature of transition format is Input, Top of stack, PUSH/POPExamplea ,a , aa means on i/p a and top of stack is a then push aAt q0 i, e initial if a or b anything came move state to q1Till q1 we get 1 b to make substring b_ _ so now on q1 if ...
Read MoreConstruct a TM that accepts even-length palindromes over the alphabet {0,1}?
A Turing machine (TM) is a 7-tuple (Q, ∑, Γ, δ, q0, qaccept , qreject).Where, Q is a finite set of states.∑ is the input alphabet that does not contain the blank symbol t.Γ is the tape alphabet, where t ∈ Γ and ∑ ⊆ Γ.δ: (Q × Γ) → (Q × Γ × {L, R}) is the transition function.q0 ∈ Q is the start state.qaccept ∈ Q is the accept state.qreject ∈ Q is the reject state, where qreject ≠ qaccept.For accepting even-length palindrome over the alphabet {0, 1}, follow the steps given below −Match the first and last ...
Read MoreConstruct a TM for a binary number as an input and replace the last digit with its Boolean complement?
ProblemDesign a TM (Turing Machine) that takes a binary number as an input and replaces the last digit of the string with its Boolean complement.SolutionA Turing machine is a 7-tuple (Q, ∑, Γ, δ, q0, qaccept , qreject)Where, Q is a finite set of states.∑ is the input alphabet that does not contain the blank symbol t.Γ is the tape alphabet, where t ∈ Γ and ∑ ⊆ Γ.δ − (Q × Γ) → (Q × Γ × {L, R}) is the transition function.q0 ∈ Q is the start state.qaccept ∈ Q is the accept state.qreject ∈ Q is the ...
Read MoreProve that CFL is closed under union and star but not under intersection?
CFL refers to Context Free Language in the theory of computation (TOC). Let us now understand how CFL is closed under Union.CFL is closed under UNIONIf L1 and L2 are CFL’s then L1 U L2 is also CFL.Let L1 and L2 are generated by the Context Free Grammar (CFG).G1=(V1, T1, P1, S1) and G2=(V2, T2, P2, S2) without loss of generality subscript each non terminal of G1 and a1 and each non terminal of G2 with a2 (so that V1∩V2=φ).Subsequent steps are used production entirely from G1 or from G2.Each word generated thus is either a word in L1 or ...
Read MoreShow that the set of all languages that are not recursively enumerable on {a} is not countable?
A Recursively enumerable language is the language that accepts every string otherwise not. If a language that halt on every string, then we call it as recursive language.ProblemWe need to prove that the set of all languages that are not recursively enumerable on {a} is not countable.First let see what the recursive enumerable language is −Recursive Enumerable LanguageA language L is recursively enumerable if L is the set of strings accepted by some TM.If L is a recursive enumerable language then −if w ∈ L then a TM halts in a final state, if w ∉ L then a TM ...
Read MoreProve that the Cartesian product of a finite number of countable sets is countable?
ProblemWe have to prove that the cartesian product of a finite number of countable sets is countable.SolutionLet the X1, X2 ,…….. Xn be the countable sets.Yk= X1 * X2 * …….* Xk when k =1……. N). Thus, Yn := X1 * X2 * · · · * XnProofUsing the induction −In case k = 1 then Y1 = X1 is countable.Assuming that Yk (k ∈ n, 1 ≤ k < n) is countable;Then Yk+1 = ( X1 * X2 * …….* Xk) * Xk+1 = Yk * Xk+1 where the Yk and the Xk+1 can be called countable. Hence the ...
Read More