Adding Two Unary Number
Duration: 6 min
This video lesson is available to enrolled students.
Inside: a video lesson and guided study material.
Module outline
- About Course: About the Course
- English Language: Vocabulary, Noun, Adjectives, Tenses, Pronoun, Adverb, Preposition, Conjunction, Active Passive Voice (Voice), Articles, Direct and Indirect Speech, Sentence Correction (Error Correction), Sentence Re-arrangements (Para Jumbles) (Narrative Sequencing), Comprehension / Reading Comprehension / Unseen Passages (Critical Reasoning) (Paragraph Questions), Sentence Completion (Fill in the blanks), Cloze Test (Cloze Passage)
- Reasoning: Series (Number and Letter Series) (Numerical Relations and Reasoning), Coding Decoding, Data Sufficiency, Puzzle Solving (Puzzles), Seating Arrangements, Blood Relations, Syllogisms, Inequality, Directions (Direction Test), Deductive and Inductive Reasoning (Logical Deduction and Induction) (Prepositional Reasoning), Clock, Calendar, Analytical Reasoning (Counting Figures Reasoning), Selection Decision Table (Decision Making), Cubes & Dices, Machine Input-Output
- Quantitative Aptitude: Ratio and Proportion (Ratios), Data Interpretation, Mixture and Alligation, Permutation and Combination, Number System, Sequence and Series (Series), Speed Time and Distance, Algebra, Speed Mathematics and Basic Mathematics, Percentage, Average, Time and Work, Simple Interest and Compound Interest, Profit and Loss, Age Problems, Partnership, Mensuration and Geometry, Probability, IBPS Specific Videos
- Data Structures - Professional Knowledge: Introduction to DS, Array, Stack, Queue, Linked List, Tree, Graphs, Hashing
- Algorithms- Professional Knowledge: Algorithm Analysis, Time Complexity Analysis, Sorting Algorithms, Greedy Algorithms, Dynamic Programming, Minimum Spanning Trees, Shortest Path Algos
- Python- Professional Knowledge: Python for Placements by Yash Sir, Python Basics
- Operating System- Professional Knowledge: Introduction to OS, Process Management, CPU Scheduling, Deadlock, Threads & Process Creation, Memory Management, Virtual Memory, Disc Scheduling, File Management
- DBMS + SQL- Professional Knowledge: Basics of DBMS, ER Diagram, Relational Model & Functional Dependencies, Keys & Integrity Constraints, Normalization (1NF - BCNF), File Organization & Indexing, SQL, Transaction Management, Concurrency Control
- Computer Networks- Professional Knowledge: Introduction to CN, Data Communication, Net Layer: IP Addressing, Net Layer: IPv4 & Proto, Application Layer, Hardware basics, Network Security
- Software Engineering- Professional Knowledge: Fundamentals of Software Engineering, Software Requirements and Quality Assurance, Software Design, Estimation and Metrics, Software Testing, Software Maintenance and Configuration Management
- Computer Organization & Microprocessor- Professional Knowledge: Basics of COA, Cache Memory Organization, Programming the Basic Computer
- Digital Logic Design- Professional Knowledge: Digital Systems & Boolean Basics, Logic Gates & Hardware, Boolean Expression, Boolean Minimization, Combinational Circuit, Sequential Circuits, Number System, Number Representation
- Theory of Computation- Professional Knowledge: Introduction to TOC, Deterministic FA (DFA), Non-Deterministic FA, Regular Expressions, Regular Language Properties, Pushdown Automata & CFG, Turing Machines
- Compiler Design- Professional Knowledge: Intro to Compilers, Lexical Analysis, Grammar & CFG, Syntax Analysis: Top-Down, Intermediate Code Gen, Code Optimization
- Programming Languages- Professional Knowledge: C Programming by Yash Sir, Object Oriented Programming (OOPS), Programming in C++, Java, C Language Core
- Emerging Tech- Professional Knowledge: Emerging Tech Trends
- Artificial Intelligence: Artificial Intelligence
- Unit Test - Professional Knowledge:
- Full Length Mock Test:
AI summary & chapters
AI Summary
An AI-generated summary of this video lecture.
The video presents a lecture on designing a Turing machine to perform addition of two numbers represented in unary notation. The instructor begins by stating the problem: given two unary numbers separated by a blank symbol, the machine must output their sum in unary. He illustrates the concept using a specific example where the input represents the numbers 3 and 4. The tape is initialized with a blank symbol, followed by three '1's, a separator 'B', four '1's, and trailing blanks. The goal is to transform this input into a sequence of seven '1's, representing the sum 7. The instructor then proceeds to design the state transition diagram step-by-step, explaining the logic behind each state and transition to achieve the desired result.
Chapters
0:00 – 2:00 00:00-02:00
The video opens with the question "Design a Turing machine for addition of two number in unary?" displayed at the top. The instructor introduces the problem and begins drawing a tape diagram. He marks the start with 'B'. He writes three vertical lines '111' for the number 3. He places a 'B' as a separator. Next, he writes four vertical lines '1111' for the number 4. He labels the groups '3' and '4' above the tape. He explains the input is 111B1111. He states the output should be 1111111 (seven '1's). He emphasizes the machine must produce the correct unary sum.
2:00 – 5:00 02:00-05:00
The instructor starts constructing the state diagram. He draws the initial state q0. He adds a self-loop on q0 labeled "1,1,R", indicating that the machine reads '1', writes '1', and moves right, staying in q0. This allows the machine to scan through the first number without changing it. He then draws a transition from q0 to a new state q1 labeled "B,1,R". He explains that when the machine encounters the separator 'B', it writes '1' and moves right. This effectively replaces the separator with a '1', merging the two numbers into a single block of '1's. Now the tape conceptually looks like 11111111. He draws state q1 and adds a self-loop "1,1,R" to scan through the second number. When it hits the end blank 'B', he draws a transition to state q2 labeled "B,B,L". This moves the head left to the last '1'. In state q2, he draws a transition to q3 labeled "1,B,R". He explains that this writes 'B' (deleting the '1') and moves right. This step removes the extra '1' that was added when the separator was replaced. Finally, from q3, he draws a transition to the final state q4 labeled "B,B,R".
5:00 – 5:31 05:00-05:31
The instructor completes the state diagram by finalizing the transition to the final state q4. He briefly reviews the entire logic, confirming that the machine successfully adds the two numbers. He mentions that this approach works by effectively concatenating the numbers and then subtracting one to correct the count. He concludes the lecture segment, having successfully designed the Turing machine for unary addition. The video ends with the completed diagram visible on the screen, showing the states q0, q1, q2, q3, and q4 connected by the defined transitions.
The lecture demonstrates a systematic approach to designing a Turing machine for a basic arithmetic operation. By breaking down the problem into scanning, merging, and correcting steps, the instructor shows how simple state transitions can achieve complex tasks like addition. The key insight is treating the separator as a bridge to merge the unary strings and then adjusting the count to ensure accuracy. This method highlights the power of Turing machines in manipulating symbols on a tape to perform logical operations.